![]() |
XII Release 0.1.0
|
#include <Command.h>
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 xiiRTTI * | GetDynamicRTTI () 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) |
| xiiDocument * | GetDocument () |
Protected Attributes | |
| xiiString | m_sDescription |
| bool | m_bUndoable = true |
| bool | m_bModifiedDocument = true |
| xiiHybridArray< xiiCommand *, 8 > | m_ChildActions |
| xiiDocument * | m_pDocument = nullptr |
Friends | |
| class | xiiCommandHistory |
| class | xiiCommandTransaction |
Additional Inherited Members | |
| Static Public Member Functions inherited from xiiNoBase | |
| static const xiiRTTI * | GetStaticRTTI () |
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.