casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
casa::TBEditArrayDataAction Class Reference

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

#include <TBAction.h>

Inheritance diagram for casa::TBEditArrayDataAction:
casa::TBAction

List of all members.

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

TBTableTabstt
 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.
TBDatanewVal
 New value.
TBDataoldVal
 Old value.
String actionName
 This action's name.
bool oneDim
 Indicates whether the array is one-dimensional or not.

Detailed Description

TBAction for when array data in the table is edited.

Synopsis

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.


Constructor & Destructor Documentation

casa::TBEditArrayDataAction::TBEditArrayDataAction ( TBTableTabs tt,
TBViewArray array,
int  row,
int  col,
vector< int >  coord,
TBData newVal 
)

Member Function Documentation

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.

Implements TBAction::name().

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

Implements casa::TBAction.

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.

Updates the underlying table with the given value.


Member Data Documentation

This action's name.

Definition at line 343 of file TBAction.h.

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.

New value.

Definition at line 331 of file TBAction.h.

Old value.

Definition at line 339 of file TBAction.h.

Indicates whether the array is one-dimensional or not.

Definition at line 347 of file TBAction.h.

Row of the edit data.

Definition at line 323 of file TBAction.h.

Origin table.

Definition at line 319 of file TBAction.h.


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