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, std::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.
std::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 280 of file TBAction.h.


Constructor & Destructor Documentation

casa::TBEditArrayDataAction::TBEditArrayDataAction ( TBTableTabs tt,
TBViewArray array,
int  row,
int  col,
std::vector< int >  coord,
TBData newVal 
)
virtual casa::TBEditArrayDataAction::~TBEditArrayDataAction (  )  [virtual]

Member Function Documentation

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.


Member Data Documentation

This action's name.

Definition at line 340 of file TBAction.h.

Column of the edit data.

Definition at line 324 of file TBAction.h.

std::vector<int> casa::TBEditArrayDataAction::coords [private]

Array coordinates of the edit data.

Definition at line 328 of file TBAction.h.

New value.

Definition at line 332 of file TBAction.h.

Old value.

Definition at line 336 of file TBAction.h.

Indicates whether the array is one-dimensional or not.

Definition at line 344 of file TBAction.h.

Row of the edit data.

Definition at line 320 of file TBAction.h.

Origin table.

Definition at line 316 of file TBAction.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1