CFx SDK Documentation  2022 SP0
Public Member Functions | Static Public Member Functions | Friends | List of all members
OdRxOverrule Class Referenceabstract

#include <RxOverrule.h>

Inheritance diagram for OdRxOverrule:
OdRxObject OdDbGeometryOverrule OdDbGripOverrule OdDbHighlightOverrule OdDbObjectOverrule OdDbOsnapOverrule OdDbPropertiesOverrule OdDbSubentityOverrule OdDbTransformOverrule OdDbVisibilityOverrule OdGiDrawableOverrule

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdRxOverrule)
 
virtual ~OdRxOverrule ()
 
virtual bool isApplicable (const OdRxObject *pOverruledSubject) const =0
 
- 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 OdResult addOverrule (OdRxClass *pClass, OdRxOverrule *pOverrule, bool bAddAtLast=false)
 
static OdResult removeOverrule (OdRxClass *pClass, OdRxOverrule *pOverrule)
 
static void setIsOverruling (bool bIsOverruling)
 
static bool isOverruling ()
 
static bool hasOverrule (const OdRxObject *pSubject, OdRxClass *pOverruleClass)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Friends

class OdRxOverruleInternals
 

Detailed Description

This class is an abstract base class for implementation of overrules. An overrule can be registered or unregistered, and overrules can be globally activated or deactivated. Overrules are internally managed by pairs of classes named as "target" and "overrule." The "target" is the class to which the overrule applies. Classes can have multiple overrules registered.

Corresponding C++ library: TD_Db <group OdRx_Classes>

Definition at line 41 of file RxOverrule.h.

Constructor & Destructor Documentation

◆ ~OdRxOverrule()

virtual OdRxOverrule::~OdRxOverrule ( )
virtual

Destructor deletes an instance of this class.

Member Function Documentation

◆ addOverrule()

static OdResult OdRxOverrule::addOverrule ( OdRxClass pClass,
OdRxOverrule pOverrule,
bool  bAddAtLast = false 
)
static

Registers an object for a given class to be overruled. This method returns eOk if successful.

Parameters
pClass[in] A raw pointer to the class description object to which the overrule applies.
pOverrule[in] A raw pointer to an object to be overruled.
bAddAtLast[in] Determines whether the pair should be added in the end of the overrule collection.

◆ hasOverrule()

static bool OdRxOverrule::hasOverrule ( const OdRxObject pSubject,
OdRxClass pOverruleClass 
)
static

Checks whether the specified overrule handles a given object and returns True if the object is to be handled by overrule, or False, otherwise.

Parameters
pOverruleClass[in] A raw pointer to the class description object to which the overrule applies.
pSubject[in] A raw pointer to an object to be overruled.

◆ isApplicable()

virtual bool OdRxOverrule::isApplicable ( const OdRxObject pOverruledSubject) const
pure virtual

Determines whether the overrule is applicable and returns True if the overrule can be applied, or False, otherwise. It is a pure virtual method that must be implemented in the derived class.

Parameters
pOverruledSubject[in] A raw pointer to an object to be overruled.

◆ isOverruling()

static bool OdRxOverrule::isOverruling ( )
inlinestatic

Checks whether the overruling mechanism is enabled (true) or disabled (false).

Definition at line 88 of file RxOverrule.h.

◆ ODRX_DECLARE_MEMBERS()

OdRxOverrule::ODRX_DECLARE_MEMBERS ( OdRxOverrule  )

◆ removeOverrule()

static OdResult OdRxOverrule::removeOverrule ( OdRxClass pClass,
OdRxOverrule pOverrule 
)
static

Unregisters an object for the given class. This method returns eOk if successful.

Parameters
pClass[in] A raw pointer to the class description object to which the overrule applies.
pOverrule[in] A raw pointer to an object to be overruled.

◆ setIsOverruling()

static void OdRxOverrule::setIsOverruling ( bool  bIsOverruling)
static

Enables or disables the overruling mechanism.

Parameters
bIsOverruling[in] Determines whether the overruling mechanism is enabled (true) or disabled (false).

Friends And Related Function Documentation

◆ OdRxOverruleInternals

friend class OdRxOverruleInternals
friend

DOM

Definition at line 107 of file RxOverrule.h.


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