Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

RmUndoOp Class Reference

Base undo operation class. More...

#include <RmUndo.h>

Inheritance diagram for RmUndoOp:

RmAddNodeUndoOp RmBeginMessageBlockUndoOp RmChangeActiveEffectUndoOp RmDeleteNodeUndoOp RmEndMessageBlockUndoOp RmModelOrientationChangeUndoOp RmRenameNodeUndoOp RmSemanticChangeUndoOp RmTextureOriginChangeUndoOp RmUpdateNodeUndoOp List of all members.

Public Member Functions

 RmUndoOp (const RM_TCHAR *strOpName)
 Constructor.

virtual ~RmUndoOp ()
 Destructor.

RmStringT GetOpName () const
 Op name.

virtual void ExecuteUndo ()
 Execute undo.

virtual void ExecuteRedo ()
 Execute redo.

bool IsUndone () const
void AddChild (RmUndoOp *pUndoOp)
 Add child operation.

void RemoveChild (RmUndoOp *pUndoOp)
 Remove child operation.

void RemoveAllChildren ()
 Remove all children.

RmUndoOpListIterator BeginChild ()
 Begin iterator for child ops.

RmUndoOpListConstIterator BeginChild () const
 Begin iterator for child ops.

RmUndoOpListIterator EndChild ()
 End iterator for child ops.

RmUndoOpListConstIterator EndChild () const
 End iterator for child ops.

int GetNumChildren () const
 Number of children.


Protected Member Functions

virtual void Undo ()
 Undo execution.

virtual void Redo ()
 Redo execution.

void UndoChildren ()
 Handle undo of children.

void RedoChildren ()
 Handle Redo of children.


Protected Attributes

RmUndoOpList m_childList
 List of children undo's.

bool m_isUndone
 True, if Undo is executed and waiting to be redone.

RmStringT m_strOpName
 Operation name.


Detailed Description

Base undo operation class.

To create new undo op, derive a class from this and override Undo/Redo to do any customized action.

Undo op can be hierarchical. Meaning one undo op may have one or more children. When Undo'ing the operation, all children's Undo get executed before parent's undo. When Redo'ing the operation, parent's Redo gets executed before children.


Constructor & Destructor Documentation

RmUndoOp::RmUndoOp const RM_TCHAR *  strOpName  ) 
 

Constructor.

Constructor

virtual RmUndoOp::~RmUndoOp  )  [virtual]
 

Destructor.

Destructor


Member Function Documentation

void RmUndoOp::AddChild RmUndoOp pUndoOp  ) 
 

Add child operation.

Add child op to this op

pUndoOp Undo op to add as child

Returns:
None

RmUndoOpListConstIterator RmUndoOp::BeginChild  )  const [inline]
 

Begin iterator for child ops.

Begin iterator for child ops

Returns:
Begin iterator

RmUndoOpListIterator RmUndoOp::BeginChild  )  [inline]
 

Begin iterator for child ops.

Begin iterator for child ops

Returns:
Begin iterator

RmUndoOpListConstIterator RmUndoOp::EndChild  )  const [inline]
 

End iterator for child ops.

End iterator for child ops

Returns:
End iterator

RmUndoOpListIterator RmUndoOp::EndChild  )  [inline]
 

End iterator for child ops.

End iterator for child ops

Returns:
End iterator

virtual void RmUndoOp::ExecuteRedo  )  [virtual]
 

Execute redo.

Execute undo. Handle this class's Redo then process alll children's redo

Returns:
None

virtual void RmUndoOp::ExecuteUndo  )  [virtual]
 

Execute undo.

Execute undo. Handle alll undo of children then call Undo of this class

Returns:
None

int RmUndoOp::GetNumChildren  )  const [inline]
 

Number of children.

Returns Number of child undo ops belong to this op.

Returns:
Number of children

RmStringT RmUndoOp::GetOpName  )  const [inline]
 

Op name.

Operation name

Returns:
Operation name

virtual void RmUndoOp::Redo  )  [protected, virtual]
 

Redo execution.

Override these to perform customized redo

Returns:
None

Reimplemented in RmDeleteNodeUndoOp, RmAddNodeUndoOp, RmRenameNodeUndoOp, RmSemanticChangeUndoOp, RmModelOrientationChangeUndoOp, RmTextureOriginChangeUndoOp, RmUpdateNodeUndoOp, RmChangeActiveEffectUndoOp, RmBeginMessageBlockUndoOp, and RmEndMessageBlockUndoOp.

void RmUndoOp::RedoChildren  )  [protected]
 

Handle Redo of children.

Handle redo of children

Returns:
None

void RmUndoOp::RemoveAllChildren  ) 
 

Remove all children.

Remove all children operations

Returns:
None

void RmUndoOp::RemoveChild RmUndoOp pUndoOp  ) 
 

Remove child operation.

Remove child op from this op

Parameters:
pUndoOp Undo op to remove
Returns:
None

virtual void RmUndoOp::Undo  )  [protected, virtual]
 

Undo execution.

Override these to perform customized undo

Returns:
None

Reimplemented in RmDeleteNodeUndoOp, RmAddNodeUndoOp, RmRenameNodeUndoOp, RmSemanticChangeUndoOp, RmModelOrientationChangeUndoOp, RmTextureOriginChangeUndoOp, RmUpdateNodeUndoOp, RmChangeActiveEffectUndoOp, RmBeginMessageBlockUndoOp, and RmEndMessageBlockUndoOp.

void RmUndoOp::UndoChildren  )  [protected]
 

Handle undo of children.

Handle undo of children

Returns:
None


The documentation for this class was generated from the following file:
Generated on Fri Feb 25 16:09:30 2005 for RenderMonkey SDK by doxygen 1.3.6