Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

ACT_Action Class Reference

An action that can be applied or undone. More...

#include <ACT_Action.h>

Inheritance diagram for ACT_Action:

GEN_Shared ACT_TestAction List of all members.

Public Methods

 ACT_Action (GEN_String &name,bool applied=false)
 Constructs an action with the given name . More...

virtual void getName (GEN_String &name)const
 Returns the name of the action. More...

virtual char* getName ()
 Returns the name of the action as a pointer to the data of the string. More...

virtual void setName (const GEN_String &name)
 Sets the name of the action. More...

virtual bool getIsApplied ()const
 Returns whether this action is applied. More...

virtual void apply ()
 Call this member to apply an action. More...

virtual void undo ()
 Call this member to undo an action . More...


Protected Methods

virtual void doApply ()=0
 Implementations should overload this method to provide the apply functionality.

virtual void doUndo ()=0
 Implementations should overload this method to provide the undo functionality.


Protected Attributes

bool m_applied
 Is this action already applied?

GEN_String m_name
 Name of this action.


Detailed Description

An action that can be applied or undone.

Virtual base class for actions with a name. An action object inherits the shared object reference count mechanism.

Author(s):
Maarten Gribnau
Date:
March 31, 2001


Constructor & Destructor Documentation

ACT_Action::ACT_Action ( GEN_String & name,
bool applied = false )
 

Constructs an action with the given name .

Parameters:
name   the name of the action.
applied   state of the action after creation.


Member Function Documentation

void ACT_Action::apply ( ) [virtual]
 

Call this member to apply an action.

Child classes should override the doApply member to implement apply functionality.

See also:
doApply.

bool ACT_Action::getIsApplied ( ) const [inline, virtual]
 

Returns whether this action is applied.

Returns:
whether this action is applied.

char * ACT_Action::getName ( ) [inline, virtual]
 

Returns the name of the action as a pointer to the data of the string.

Returns:
pointer to the name of the action.

void ACT_Action::getName ( GEN_String & name ) const [inline, virtual]
 

Returns the name of the action.

Parameters:
name   the name of the action.

void ACT_Action::setName ( const GEN_String & name ) [inline, virtual]
 

Sets the name of the action.

Parameters:
name   the name of the action.

void ACT_Action::undo ( ) [virtual]
 

Call this member to undo an action .

Child classes should override the doUndo member to implement undo functionality.

See also:
doApply()


The documentation for this class was generated from the following files:
Generated at Thu May 3 18:16:00 2001 for ActionLib by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000