Plasma Engine  2.0
Loading...
Searching...
No Matches
plCommand Class Referenceabstract

Interface for a command. More...

#include <Command.h>

Inheritance diagram for plCommand:

Public Types

enum class  CommandState { WasDone , WasUndone }
 

Public Member Functions

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

Protected Member Functions

plStatus Do (bool bRedo)
 
plStatus Undo (bool bFireEvents)
 
void Cleanup (CommandState state)
 
plStatus AddSubCommand (plCommand &command)
 
plDocumentGetDocument ()
 

Protected Attributes

plString m_sDescription
 
bool m_bUndoable = true
 
bool m_bModifiedDocument = true
 
plHybridArray< plCommand *, 8 > m_ChildActions
 
plDocumentm_pDocument = nullptr
 

Friends

class plCommandHistory
 
class plCommandTransaction
 

Additional Inherited Members

- Static Public Member Functions inherited from plNoBase
static const plRTTIGetStaticRTTI ()
 

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 plCommandHistory is the only class capable of executing commands.


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