casa
$Rev:20696$
|
TBAction for when array data in the table is edited. More...
#include <TBAction.h>
Public Member Functions | |
TBEditArrayDataAction (TBTableTabs *tt, TBViewArray *array, int row, int col, vector< int > coord, TBData *newVal) | |
virtual | ~TBEditArrayDataAction () |
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. | |
vector< int > | coords |
Array coordinates of the edit data. | |
TBData * | newVal |
New value. | |
TBData * | oldVal |
Old value. | |
String | actionName |
This action's name. | |
bool | oneDim |
Indicates whether the array is one-dimensional or not. |
TBAction for when array data in the table is edited.
A TBEditArrayDataAction keeps track of the table, row, column, array coordinates, new value, and old value. When this action is performed, the underlying table is updated to the new value at the given row, column, and coordinates; when this action is undone, the underlying table is updated to the old value.
Definition at line 283 of file TBAction.h.
casa::TBEditArrayDataAction::TBEditArrayDataAction | ( | TBTableTabs * | tt, |
TBViewArray * | array, | ||
int | row, | ||
int | col, | ||
vector< int > | coord, | ||
TBData * | newVal | ||
) |
virtual casa::TBEditArrayDataAction::~TBEditArrayDataAction | ( | ) | [virtual] |
Result casa::TBEditArrayDataAction::doAction | ( | ) | [virtual] |
Implements TBAction::doAction().
Updates the table by calling TBTable::editArrayData() followed by a TBViewArray::setDataAt() if the edit is successful. Returns the result of the TBTable::editArrayData().
Implements casa::TBAction.
bool casa::TBEditArrayDataAction::isAssociatedWith | ( | void * | o | ) | [virtual] |
Implements TBAction::isAssociatedWith().
Returns true if o is the TBTableTabs object or the TBViewArray object given in the constructor, false otherwise.
Implements casa::TBAction.
String casa::TBEditArrayDataAction::name | ( | ) | [virtual] |
Implements TBAction::name().
Returns "edit [table name]([row],[col])[coords]".
Implements casa::TBAction.
Result casa::TBEditArrayDataAction::undoAction | ( | ) | [virtual] |
Implements TBAction::undoAction().
Updates the table by calling TBTable::editArrayData() followed by a TBViewArray::setDataAt() if the edit is successful. Returns the result of the TBTable::editArrayData().
Implements casa::TBAction.
Result casa::TBEditArrayDataAction::update | ( | TBData * | val | ) | [private] |
Updates the underlying table with the given value.
This action's name.
Definition at line 343 of file TBAction.h.
int casa::TBEditArrayDataAction::col [private] |
Column of the edit data.
Definition at line 327 of file TBAction.h.
vector<int> casa::TBEditArrayDataAction::coords [private] |
Array coordinates of the edit data.
Definition at line 331 of file TBAction.h.
TBData* casa::TBEditArrayDataAction::newVal [private] |
New value.
Definition at line 331 of file TBAction.h.
TBData* casa::TBEditArrayDataAction::oldVal [private] |
Old value.
Definition at line 339 of file TBAction.h.
bool casa::TBEditArrayDataAction::oneDim [private] |
Indicates whether the array is one-dimensional or not.
Definition at line 347 of file TBAction.h.
int casa::TBEditArrayDataAction::row [private] |
Row of the edit data.
Definition at line 323 of file TBAction.h.
TBTableTabs* casa::TBEditArrayDataAction::tt [private] |
Origin table.
Definition at line 319 of file TBAction.h.