casa
$Rev:20696$
|
TBAction for when non-array data in the table is edited. More...
#include <TBAction.h>
Public Member Functions | |
TBEditDataAction (TBTableTabs *tt, int row, int col, TBData *newVal) | |
virtual | ~TBEditDataAction () |
Result | doAction () |
Implements TBAction::doAction(). | |
Result | undoAction () |
Implements TBAction::undoAction(). | |
String | name () |
Implements TBAction::name(). | |
bool | isAssociatedWith (void *o) |
Implements TBAction::isAssociatedWith(). | |
Private Member Functions | |
Result | update (TBData *val) |
Updates the underlying table with the given value. | |
Private Attributes | |
TBTableTabs * | tt |
Origin table. | |
int | row |
Row of the edit data. | |
int | col |
Column of the edit data. | |
TBData * | newVal |
New value. | |
TBData * | oldVal |
Old value. | |
String | actionName |
This action's name. |
TBAction for when non-array data in the table is edited.
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 208 of file TBAction.h.
casa::TBEditDataAction::TBEditDataAction | ( | TBTableTabs * | tt, |
int | row, | ||
int | col, | ||
TBData * | newVal | ||
) |
virtual casa::TBEditDataAction::~TBEditDataAction | ( | ) | [virtual] |
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.
String casa::TBEditDataAction::name | ( | ) | [virtual] |
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.
String casa::TBEditDataAction::actionName [private] |
This action's name.
Definition at line 263 of file TBAction.h.
int casa::TBEditDataAction::col [private] |
Column of the edit data.
Definition at line 251 of file TBAction.h.
TBData* casa::TBEditDataAction::newVal [private] |
New value.
Definition at line 255 of file TBAction.h.
TBData* casa::TBEditDataAction::oldVal [private] |
Old value.
Definition at line 259 of file TBAction.h.
int casa::TBEditDataAction::row [private] |
Row of the edit data.
Definition at line 247 of file TBAction.h.
TBTableTabs* casa::TBEditDataAction::tt [private] |
Origin table.
Definition at line 243 of file TBAction.h.