CFx SDK Documentation  2020SP3
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OdEdCommand Class Referenceabstract

#include <EdCommandStack.h>

Inheritance diagram for OdEdCommand:
OdRxObject CFxCommand

Public Types

enum  {
  kModal = 0x00000000, kTransparent = 0x00000001, kUsePickset = 0x00000002, kRedraw = 0x00000004,
  kNoPerspective = 0x00000008, kNoMultiple = 0x00000010, kNoTilemode = 0x00000020, kNoPaperspace = 0x00000040,
  kPlotOnly = 0x00000080, kNoOEM = 0x00000100, kUndefined = 0x00000200, kInProgress = 0x00000400,
  kDefun = 0x00000800, kNoNewStack = 0x00010000, kNoInternalLock = 0x00020000, kDocReadLock = 0x00080000,
  kDocExclusiveLock = 0x00100000, kSession = 0x00200000, kInterruptible = 0x00400000, kNoHistory = 0x00800000,
  kNoUndoMarker = 0x01000000, kNoBedit = 0x02000000
}
 

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdEdCommand)
 
 ~OdEdCommand ()
 
virtual const OdString groupName () const =0
 
virtual const OdString globalName () const =0
 
virtual const OdString localName () const
 
virtual void execute (OdEdCommandContext *pCommandContext)=0
 
virtual const OdRxModulemodule () const
 
virtual void undefine (bool undefIt)
 
virtual OdInt32 flags () const
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () 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
 

Static Public Member Functions

static OdEdCommandPtr createObject (const OdString &sGroupName, const OdString &sGlobalName, const OdString &sLocalName, OdUInt32 commandFlags, OdEdCommandFunction *pFunction, OdRxModule *pModule=0)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Protected Member Functions

 OdEdCommand ()
 

Detailed Description

This class represents custom commands within a Teigha client application.

Remarks
A custom command is be created by deriving a class from OdEdCommand, and overriding the functions in that class.

The custom command is registered in the global command stack by calling OdEdCommandStack::addCommand() on the global command stack, which obtained via the odedRegCmds() external function.

Corresponding C++ library: TD_Root

<group OdEd_Classes>

Definition at line 74 of file EdCommandStack.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kModal 
kTransparent 
kUsePickset 
kRedraw 
kNoPerspective 
kNoMultiple 
kNoTilemode 
kNoPaperspace 
kPlotOnly 
kNoOEM 
kUndefined 
kInProgress 
kDefun 
kNoNewStack 
kNoInternalLock 
kDocReadLock 
kDocExclusiveLock 
kSession 
kInterruptible 
kNoHistory 
kNoUndoMarker 
kNoBedit 

Definition at line 82 of file EdCommandStack.h.

Constructor & Destructor Documentation

◆ OdEdCommand()

OdEdCommand::OdEdCommand ( )
protected

◆ ~OdEdCommand()

OdEdCommand::~OdEdCommand ( )

Member Function Documentation

◆ createObject()

static OdEdCommandPtr OdEdCommand::createObject ( const OdString sGroupName,
const OdString sGlobalName,
const OdString sLocalName,
OdUInt32  commandFlags,
OdEdCommandFunction pFunction,
OdRxModule pModule = 0 
)
static

◆ execute()

virtual void OdEdCommand::execute ( OdEdCommandContext pCommandContext)
pure virtual

Called to execute this command object.

Remarks
The client's override of this function contains the body of the command.
Parameters
pCommandContext[in] Pointer to the command context.
Remarks
The specified command context object is used to interact with the calling application as part of an interactive command.
See also
OdEdCommandContext::userIO

Implemented in CFxCommand.

◆ flags()

virtual OdInt32 OdEdCommand::flags ( ) const
virtual

Reimplemented in CFxCommand.

◆ globalName()

virtual const OdString OdEdCommand::globalName ( ) const
pure virtual

Returns the global (untranslated) name of this command object.

Remarks
This name must be unique within the groupName of this command object.

◆ groupName()

virtual const OdString OdEdCommand::groupName ( ) const
pure virtual

Returns the group name of this command object.

Remarks
This name is used to group sets of registered commands.

Implemented in CFxCommand.

◆ localName()

virtual const OdString OdEdCommand::localName ( ) const
virtual

Returns the local (translated) name of this command.

Remarks
This name must be unique within the groupName of this command object.

◆ module()

virtual const OdRxModule* OdEdCommand::module ( ) const
virtual

◆ ODRX_DECLARE_MEMBERS()

OdEdCommand::ODRX_DECLARE_MEMBERS ( OdEdCommand  )

◆ undefine()

virtual void OdEdCommand::undefine ( bool  undefIt)
virtual

Reimplemented in CFxCommand.


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