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

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

#include <TBAction.h>

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

List of all members.

Public Member Functions

 TBAction (void *origin)
 Constructor that takes a pointer to the origin object.
virtual ~TBAction ()
void * getOrigin ()
 Returns a pointer to the origin object.
virtual Result doAction ()=0
 doAction() must be implemented by any subclass.
virtual Result undoAction ()=0
 undoAction() must be implemented by any subclass.
virtual String name ()=0
 name() must be implemented by any subclass.
virtual bool isAssociatedWith (void *origin)=0
 isAssociatedWith() must be implemented by any subclass.

Protected Attributes

void * origin
 Pointer to origin object.

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 57 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.

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 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 100 of file TBAction.h.


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