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::TBEditArrayDataAction Class Reference

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

#include <TBAction.h>

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

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(). 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...
 
std::vector< int > coords
 casacore::Array coordinates of the edit data. More...
 
TBDatanewVal
 New value. More...
 
TBDataoldVal
 Old value. More...
 
casacore::String actionName
 This action's name. More...
 
bool oneDim
 Indicates whether the array is one-dimensional or not. More...
 

Additional Inherited Members

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

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.

casacore::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

casacore::String casa::TBEditArrayDataAction::actionName
private

This action's name.

Definition at line 340 of file TBAction.h.

int casa::TBEditArrayDataAction::col
private

Column of the edit data.

Definition at line 324 of file TBAction.h.

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

casacore::Array coordinates of the edit data.

Definition at line 328 of file TBAction.h.

TBData* casa::TBEditArrayDataAction::newVal
private

New value.

Definition at line 332 of file TBAction.h.

TBData* casa::TBEditArrayDataAction::oldVal
private

Old value.

Definition at line 336 of file TBAction.h.

bool casa::TBEditArrayDataAction::oneDim
private

Indicates whether the array is one-dimensional or not.

Definition at line 344 of file TBAction.h.

int casa::TBEditArrayDataAction::row
private

Row of the edit data.

Definition at line 320 of file TBAction.h.

TBTableTabs* casa::TBEditArrayDataAction::tt
private

Origin table.

Definition at line 316 of file TBAction.h.


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