CFx SDK Documentation
2020SP3
|
#include <EdCommandStack.h>
Public Types | |
enum | LookupFlags { kGlobal = 0x01, kLocal = 0x02, kSpecifedGroup = 0x04, kUndefed = 0x08, kThrowUnknown = 0x10 } |
Public Member Functions | |
ODRX_DECLARE_MEMBERS (OdEdCommandStack) | |
virtual void | addReactor (OdEdCommandStackReactor *pReactor)=0 |
virtual void | removeReactor (OdEdCommandStackReactor *pReactor)=0 |
virtual OdEdCommandStackReactorArray | getCommandStackReactors () const =0 |
virtual void | addCommand (OdEdCommand *pCommand)=0 |
virtual OdEdCommand * | addCommand (const OdString &sGroupName, const OdString &sGlobalName, const OdString &sLocalName, OdUInt32 commandFlags, OdEdCommandFunction *pFunction, OdRxModule *pModule=0) |
virtual OdRxIteratorPtr | newIterator ()=0 |
virtual OdRxIteratorPtr | newIterator (const OdString &groupName)=0 |
virtual OdRxIteratorPtr | newGroupIterator ()=0 |
virtual OdEdCommandPtr | lookupCmd (const OdString &commandName, int lookupFlags=kGlobal|kLocal, const OdString &groupName=OdString::kEmpty)=0 |
virtual void | executeCommand (OdEdCommand *pCmd, OdEdCommandContext *pCmdCtx)=0 |
virtual void | executeCommand (const OdString &cmdName, OdEdCommandContext *pCmdCtx, int lookupFlags=kGlobal|kLocal, const OdString &groupName=OdString::kEmpty)=0 |
virtual void | removeCmd (const OdString &groupName, const OdString &globalName)=0 |
virtual void | removeCmd (const OdEdCommand *pCommand)=0 |
virtual void | removeGroup (const OdString &groupName)=0 |
virtual OdResult | popGroupToTop (const OdString &cmdGroupName)=0 |
Public Member Functions inherited from OdRxObject | |
ODRX_HEAP_OPERATORS () | |
OdRxObject () | |
virtual | ~OdRxObject () |
virtual OdRxObject * | queryX (const OdRxClass *pClass) const |
virtual OdRxObject * | x (const OdRxClass *pClass) const |
virtual OdRxClass * | isA () const |
virtual void | addRef ()=0 |
virtual void | release ()=0 |
virtual long | numRefs () const |
bool | isKindOf (const OdRxClass *pClass) const |
virtual OdRxObjectPtr | clone () const |
virtual void | copyFrom (const OdRxObject *pSource) |
virtual OdRx::Ordering | comparedTo (const OdRxObject *pOther) const |
virtual bool | isEqualTo (const OdRxObject *pOther) const |
Additional Inherited Members | |
Static Public Member Functions inherited from OdRxObject | |
static OdRxObjectPtr | cast (const OdRxObject *pointer) |
static OdRxClass * | desc () |
This class implements and manages the global command stack.
The lookupCommand and executeCommand functions search for command names in the group order on the stack.
In the case of duplicate command names, the most recent one added to the stack is the command that is returned or executed.
The group order may be changed with popGroupToTop function.
Corresponding C++ library: TD_Root
<group OdEd_Classes>
Definition at line 306 of file EdCommandStack.h.
Enumerator | |
---|---|
kGlobal | |
kLocal | |
kSpecifedGroup | |
kUndefed | |
kThrowUnknown |
Definition at line 393 of file EdCommandStack.h.
|
virtual |
Adds the specified command object to this Stack object.
pCommand | [in] Pointer to the command object. |
The globalName and localName must be unique within the groupName of this command object.
|
pure virtual |
Adds the specified command object to this Stack object.
pCommand | [in] Pointer to the command object. |
The globalName and localName must be unique within the groupName of this command object.
|
pure virtual |
Adds the specified reactor to this object's reactor list.
pReactor | [in] Pointer to the reactor object. |
|
pure virtual |
Executes the specified command in this Stack object.
cmdName | [in] Name of the command to find. |
pCmdCtx | [in] Pointer to the command context. |
lookupFlags | [in] Specified where command lookup is to look. |
groupName | [in] Group name. |
If groupName is specified, only that group will be searched.
lookupFlags must be a combination of one or more of the following:
Value Description kGlobal 0x01 Search global (untranslated) names. kLocal 0x02 Search local (translated) names. kSpecifedGroup 0x04 Search in specified group only. kUndefed 0x08 Indicates whether or not to return commands that are currently marked as undefined. kThrowUnknown 0x10 Throw OdEdUnknownCommand exception if command was not found.
|
pure virtual |
Executes the specified command in this Stack object.
pCommand | [in] Pointer to the command object to execute. |
pCmdCtx | [in] Pointer to the command context. |
This function searches for both global and local command names in the group order on the stack.
|
pure virtual |
Returns this object's transient reactors.
|
pure virtual |
Returns the OdEdCommand object with the specified name in this Stack object.
commandName | [in] Name of the command to find. |
lookupFlags | [in] Specified where command lookup is to look. |
groupName | [in] Group name. |
If groupName is specified, only that group will be searched.
lookupFlags must be a combination of one or more of the following:
Value Description kGlobal 0x01 Search global (untranslated) names. kLocal 0x02 Search local (translated) names. kSpecifedGroup 0x04 Search in specified group only. kUndefed 0x08 Indicates whether or not to return commands that are currently marked as undefined.
|
pure virtual |
Returns an Iterator object that can be used to traverse the group objects in this Stack object.
|
pure virtual |
Returns an Iterator object that can be used to traverse the OdEdCommand objects in this Stack object.
|
pure virtual |
Returns an Iterator object that can be used to traverse the OdEdCommand objects in this Stack object.
groupName | [in] Group name. |
OdEdCommandStack::ODRX_DECLARE_MEMBERS | ( | OdEdCommandStack | ) |
This function pops the cmdGroupName command group to the top of the command stack making it the first group to be searched when resolving application defined command names.
cmdGroupName | [in] Name of the command group to pop to the top of the command stack. |
|
pure virtual |
|
pure virtual |
Removes the command with the specified group and global names from this Stack object.
groupName | [in] Group name. |
globalName | [in] Global (untranslated) name. |
If the specified command is not found, this function does nothing but return.
Removes the specified group and its commands from this Stack object.
groupName | [in] Group name. |
|
pure virtual |
Removes the specified transient reactor from this object's reactor list.
pReactor | [in] Pointer to the reactor object. |