XII Release 0.1.0
Loading...
Searching...
No Matches
xiiCommand Class Referenceabstract

Interface for a command. More...

#include <Command.h>

Inheritance diagram for xiiCommand:
[legend]

Public Types

enum class  CommandState { WasDone , WasUndone }
 

Public Member Functions

bool IsUndoable () const
 
bool HasChildActions () const
 
bool HasModifiedDocument () const
 
- Public Member Functions inherited from xiiReflectedClass
virtual const xiiRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const xiiRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T>
XII_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Protected Member Functions

xiiStatus Do (bool bRedo)
 
xiiStatus Undo (bool bFireEvents)
 
void Cleanup (CommandState state)
 
xiiStatus AddSubCommand (xiiCommand &command)
 
xiiDocumentGetDocument ()
 

Protected Attributes

xiiString m_sDescription
 
bool m_bUndoable = true
 
bool m_bModifiedDocument = true
 
xiiHybridArray< xiiCommand *, 8 > m_ChildActions
 
xiiDocumentm_pDocument = nullptr
 

Friends

class xiiCommandHistory
 
class xiiCommandTransaction
 

Additional Inherited Members

- Static Public Member Functions inherited from xiiNoBase
static const xiiRTTIGetStaticRTTI ()
 

Detailed Description

Interface for a command.

Commands are the only objects that have non-const access to any data structures (contexts, documents etc.). Thus, any modification must go through a command and the xiiCommandHistory is the only class capable of executing commands.


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