casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casa::TBEditDataAction Class Reference

TBAction for when non-array data in the table is edited. More...

#include <TBAction.h>

Inheritance diagram for casa::TBEditDataAction:
casa::TBAction

Public Member Functions

 TBEditDataAction (TBTableTabs *tt, int row, int col, TBData *newVal)
 
virtual ~TBEditDataAction ()
 
Result doAction ()
 Implements TBAction::doAction(). More...
 
Result undoAction ()
 Implements TBAction::undoAction(). More...
 
casacore::String name ()
 Implements TBAction::name(). More...
 
bool isAssociatedWith (void *o)
 Implements TBAction::isAssociatedWith(). More...
 
- Public Member Functions inherited from casa::TBAction
 TBAction (void *origin)
 Constructor that takes a pointer to the origin object. More...
 
virtual ~TBAction ()
 
void * getOrigin ()
 Returns a pointer to the origin object. More...
 

Private Member Functions

Result update (TBData *val)
 Updates the underlying table with the given value. More...
 

Private Attributes

TBTableTabstt
 Origin table. More...
 
int row
 Row of the edit data. More...
 
int col
 Column of the edit data. More...
 
TBDatanewVal
 New value. More...
 
TBDataoldVal
 Old value. More...
 
casacore::String actionName
 This action's name. More...
 

Additional Inherited Members

- Protected Attributes inherited from casa::TBAction
void * origin
 Pointer to origin object. More...
 

Detailed Description

TBAction for when non-array data in the table is edited.

Synopsis

A TBEditDataAction keeps track of the table, row, column, new value, and old value. When this action is performed, the underlying table is updated to the new value at the given row and column; when this action is undone, the underlying table is updated to the old value.

Definition at line 205 of file TBAction.h.

Constructor & Destructor Documentation

casa::TBEditDataAction::TBEditDataAction ( TBTableTabs tt,
int  row,
int  col,
TBData newVal 
)
virtual casa::TBEditDataAction::~TBEditDataAction ( )
virtual

Member Function Documentation

Result casa::TBEditDataAction::doAction ( )
virtual

Implements TBAction::doAction().

Updates the table by calling TBTable::editData() followed by a TBDataTab::setData() if the edit is successful. Returns the result of the TBTable::editData() call.

Implements casa::TBAction.

bool casa::TBEditDataAction::isAssociatedWith ( void *  o)
virtual

Implements TBAction::isAssociatedWith().

Returns true if o is equal to the TBTableTabs object given in the constructor, false otherwise.

Implements casa::TBAction.

casacore::String casa::TBEditDataAction::name ( )
virtual

Implements TBAction::name().

Returns "edit [table name]([row],[col])".

Implements casa::TBAction.

Result casa::TBEditDataAction::undoAction ( )
virtual

Implements TBAction::undoAction().

Updates the table by calling TBTable::editData() followed by a TBDataTab::setData() if the edit is successful. Returns the result of the TBTable::editData() call.

Implements casa::TBAction.

Result casa::TBEditDataAction::update ( TBData val)
private

Updates the underlying table with the given value.

Member Data Documentation

casacore::String casa::TBEditDataAction::actionName
private

This action's name.

Definition at line 260 of file TBAction.h.

int casa::TBEditDataAction::col
private

Column of the edit data.

Definition at line 248 of file TBAction.h.

TBData* casa::TBEditDataAction::newVal
private

New value.

Definition at line 252 of file TBAction.h.

TBData* casa::TBEditDataAction::oldVal
private

Old value.

Definition at line 256 of file TBAction.h.

int casa::TBEditDataAction::row
private

Row of the edit data.

Definition at line 244 of file TBAction.h.

TBTableTabs* casa::TBEditDataAction::tt
private

Origin table.

Definition at line 240 of file TBAction.h.


The documentation for this class was generated from the following file: