casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
casa::TBAction Class Referenceabstract

Abstract parent class of any action that can be performed. More...

#include <TBAction.h>

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

Public Member Functions

 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...
 
virtual Result doAction ()=0
 doAction() must be implemented by any subclass. More...
 
virtual Result undoAction ()=0
 undoAction() must be implemented by any subclass. More...
 
virtual casacore::String name ()=0
 name() must be implemented by any subclass. More...
 
virtual bool isAssociatedWith (void *origin)=0
 isAssociatedWith() must be implemented by any subclass. More...
 

Protected Attributes

void * origin
 Pointer to origin object. More...
 

Detailed Description

Abstract parent class of any action that can be performed.

Synopsis

Any editing change to the underlying table should be encapsulated in a TBAction. A TBAction subclass needs to be able to perform the designated action as well as knowing how to undo it. The specific implementation of performing the action is left up to the subclasses.

Definition at line 54 of file TBAction.h.

Constructor & Destructor Documentation

casa::TBAction::TBAction ( void *  origin)

Constructor that takes a pointer to the origin object.

The origin is used to, for example, remove actions associated with objects that have been closed or otherwise made unavailable.

virtual casa::TBAction::~TBAction ( )
virtual

Member Function Documentation

virtual Result casa::TBAction::doAction ( )
pure virtual

doAction() must be implemented by any subclass.

This method performs the action, updating both the backend and the GUI as necessary.

Implemented in casa::TBEditArrayDataAction, and casa::TBEditDataAction.

void* casa::TBAction::getOrigin ( )

Returns a pointer to the origin object.

virtual bool casa::TBAction::isAssociatedWith ( void *  origin)
pure virtual

isAssociatedWith() must be implemented by any subclass.

This method returns true if this action is associated with the given origin object, false otherwise. If an action is associated with an object that is then closed (like a table or an array) then the action may be removed from the performed/undone queues.

Implemented in casa::TBEditArrayDataAction, and casa::TBEditDataAction.

virtual casacore::String casa::TBAction::name ( )
pure virtual

name() must be implemented by any subclass.

This method returns the name of the action. The name should be human-readable and does not have to be any specific format.

Implemented in casa::TBEditArrayDataAction, and casa::TBEditDataAction.

virtual Result casa::TBAction::undoAction ( )
pure virtual

undoAction() must be implemented by any subclass.

This method undoes the action, updating both the backend and the GUI as necessary.

Implemented in casa::TBEditArrayDataAction, and casa::TBEditDataAction.

Member Data Documentation

void* casa::TBAction::origin
protected

Pointer to origin object.

Definition at line 97 of file TBAction.h.


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