CFx SDK Documentation  2022 SP0
Classes | Macros
RxDispatchImpl.h File Reference
#include "TD_PackPush.h"
#include "RxDictionary.h"
#include "RxObjectImpl.h"
#include "OdString.h"
#include "TD_PackPop.h"

Go to the source code of this file.

Classes

class  OdRxPropDesc
 
class  OdRxDispatchImpl< TBase >
 
class  OdRxDispatchImpl< TBase >::Iterator
 

Macros

#define ODRX_DECLARE_DYNAMIC_PROPERTY_MAP(CLASS)
 
#define ODRX_BEGIN_DYNAMIC_PROPERTY_MAP(CLASS)   void CLASS::generatePropMap(OdRxDictionary* pInfo) const {
 
#define ODRX_END_DYNAMIC_PROPERTY_MAP(CLASS)
 
#define ODRX_INHERIT_PROPERTIES(BASE_CLASS)    BASE_CLASS::generatePropMap(pInfo);
 
#define ODRX_DECLARE_PROPERTY(PropName)
 
#define ODRX_DECLARE_PROPERTY2(PropName, SrcFileName)
 
#define ODRX_DEFINE_PROPERTY_METHODS(PropName, PropHolder, getMethodName, putMethodName, accessFn)
 
#define ODRX_DEFINE_PROPERTY_METHODS2(PropName, SrcFileName, PropHolder, getMethodName, putMethodName, accessFn)
 
#define ODRX_DEFINE_PROPERTY_METHODS_PREFIX(ClassPrefix, PropName, PropHolder, getMethodName, putMethodName, accessFn)
 
#define ODRX_GENERATE_PROPERTY(PropName)    pInfo->putAt(_##PropName##_PropDesc::_name(), _##PropName##_PropDesc::createObject());
 
#define ODRX_GENERATE_PROPERTY2(PropName, SrcFileName)    pInfo->putAt(_##PropName##_##SrcFileName##_PropDesc::_name(), _##PropName##_##SrcFileName##_PropDesc::createObject());
 
#define ODRX_DEFINE_PROPERTY(PropName, PropHolder, accessFn)   ODRX_DEFINE_PROPERTY_METHODS(PropName, PropHolder, get_##PropName, put_##PropName, accessFn)
 
#define ODRX_DEFINE_PROPERTY2(PropName, SrcFileName, PropHolder, accessFn)   ODRX_DEFINE_PROPERTY_METHODS2(PropName, SrcFileName, PropHolder, get_##PropName, put_##PropName, accessFn)
 
#define ODRX_DEFINE_PROPERTY_PREFIX(ClassPrefix, PropName, PropHolder, accessFn)   ODRX_DEFINE_PROPERTY_METHODS_PREFIX(ClassPrefix, PropName, PropHolder, get_##PropName, put_##PropName, accessFn)
 
#define ODRX_DEFINE_PROPERTY_OBJECT(PropName, PropHolder, getMethodName, putMethodName, ObjType)
 
#define ODRX_DEFINE_PROPERTY_OBJECT2(PropName, SrcFileName, PropHolder, getMethodName, putMethodName, ObjType)
 
#define ODRX_DEFINE_PROPERTY_OBJECT_PREFIX(ClassPrefix, PropName, PropHolder, getMethodName, putMethodName, ObjType)
 

Macro Definition Documentation

◆ ODRX_BEGIN_DYNAMIC_PROPERTY_MAP

#define ODRX_BEGIN_DYNAMIC_PROPERTY_MAP (   CLASS)    void CLASS::generatePropMap(OdRxDictionary* pInfo) const {

Definition at line 140 of file RxDispatchImpl.h.

◆ ODRX_DECLARE_DYNAMIC_PROPERTY_MAP

#define ODRX_DECLARE_DYNAMIC_PROPERTY_MAP (   CLASS)
Value:
virtual void generatePropMap(OdRxDictionary*) const;\
virtual OdRxDictionary* propertiesInfo() const

Definition at line 136 of file RxDispatchImpl.h.

◆ ODRX_DECLARE_PROPERTY

#define ODRX_DECLARE_PROPERTY (   PropName)
Value:
class _##PropName##_PropDesc : public OdRxObjectImpl<OdRxPropDesc>\
{\
public:\
static inline OdString _name();\
OdString name() const;\
OdRxObjectPtr prop_get(const void* pThis) const;\
void prop_put(void* pThis, OdRxObject* pVal);\
};
static OdSmartPtr< TInterface > createObject()
Definition: RxObjectImpl.h:107
GLuint const GLchar * name
Definition: gles2_ext.h:265

Definition at line 159 of file RxDispatchImpl.h.

◆ ODRX_DECLARE_PROPERTY2

#define ODRX_DECLARE_PROPERTY2 (   PropName,
  SrcFileName 
)
Value:
class _##PropName##_##SrcFileName##_PropDesc : public OdRxObjectImpl<OdRxPropDesc>\
{\
public:\
static inline OdString _name();\
OdString name() const;\
OdRxObjectPtr prop_get(const void* pThis) const;\
void prop_put(void* pThis, OdRxObject* pVal);\
};

Definition at line 170 of file RxDispatchImpl.h.

◆ ODRX_DEFINE_PROPERTY

#define ODRX_DEFINE_PROPERTY (   PropName,
  PropHolder,
  accessFn 
)    ODRX_DEFINE_PROPERTY_METHODS(PropName, PropHolder, get_##PropName, put_##PropName, accessFn)

Definition at line 256 of file RxDispatchImpl.h.

◆ ODRX_DEFINE_PROPERTY2

#define ODRX_DEFINE_PROPERTY2 (   PropName,
  SrcFileName,
  PropHolder,
  accessFn 
)    ODRX_DEFINE_PROPERTY_METHODS2(PropName, SrcFileName, PropHolder, get_##PropName, put_##PropName, accessFn)

Definition at line 258 of file RxDispatchImpl.h.

◆ ODRX_DEFINE_PROPERTY_METHODS

#define ODRX_DEFINE_PROPERTY_METHODS (   PropName,
  PropHolder,
  getMethodName,
  putMethodName,
  accessFn 
)
Value:
OdRxObjectPtr _##PropName##_PropDesc::createObject()\
{\
return OdRxObjectPtr(new _##PropName##_PropDesc, kOdRxObjAttach);\
}\
inline OdString _##PropName##_PropDesc::_name()\
{\
static OdString sName(OD_T(#PropName));\
return sName;\
}\
OdString _##PropName##_PropDesc::name() const \
{\
return _name();\
}\
OdRxObjectPtr _##PropName##_PropDesc::prop_get(const void* pThis) const\
{\
return (OdRxObject*)OdRxVariantValue((static_cast<PropHolder*>((OdRxDictionary*)pThis))->getMethodName());\
}\
void _##PropName##_PropDesc::prop_put(void* pThis, OdRxObject* pVal)\
{\
(static_cast<PropHolder*>((OdRxDictionary*)pThis))->putMethodName(OdRxVariantValue(pVal)->accessFn());\
}
#define OD_T(x)
@ kOdRxObjAttach
Definition: RxObject.h:56

Definition at line 181 of file RxDispatchImpl.h.

◆ ODRX_DEFINE_PROPERTY_METHODS2

#define ODRX_DEFINE_PROPERTY_METHODS2 (   PropName,
  SrcFileName,
  PropHolder,
  getMethodName,
  putMethodName,
  accessFn 
)
Value:
OdRxObjectPtr _##PropName##_##SrcFileName##_PropDesc::createObject()\
{\
return OdRxObjectPtr(new _##PropName##_##SrcFileName##_PropDesc, kOdRxObjAttach);\
}\
inline OdString _##PropName##_##SrcFileName##_PropDesc::_name()\
{\
static OdString sName(OD_T(#PropName));\
return sName;\
}\
OdString _##PropName##_##SrcFileName##_PropDesc::name() const \
{\
return _name();\
}\
OdRxObjectPtr _##PropName##_##SrcFileName##_PropDesc::prop_get(const void* pThis) const\
{\
return (OdRxObject*)OdRxVariantValue((static_cast<PropHolder*>((OdRxDictionary*)pThis))->getMethodName());\
}\
void _##PropName##_##SrcFileName##_PropDesc::prop_put(void* pThis, OdRxObject* pVal)\
{\
(static_cast<PropHolder*>((OdRxDictionary*)pThis))->putMethodName(OdRxVariantValue(pVal)->accessFn());\
}

Definition at line 204 of file RxDispatchImpl.h.

◆ ODRX_DEFINE_PROPERTY_METHODS_PREFIX

#define ODRX_DEFINE_PROPERTY_METHODS_PREFIX (   ClassPrefix,
  PropName,
  PropHolder,
  getMethodName,
  putMethodName,
  accessFn 
)
Value:
OdRxObjectPtr ClassPrefix _##PropName##_PropDesc::createObject()\
{\
return OdRxObjectPtr(new _##PropName##_PropDesc, kOdRxObjAttach);\
}\
inline OdString ClassPrefix _##PropName##_PropDesc::_name()\
{\
static OdString sName(OD_T(#PropName));\
return sName;\
}\
OdString ClassPrefix _##PropName##_PropDesc::name() const \
{\
return _name();\
}\
OdRxObjectPtr ClassPrefix _##PropName##_PropDesc::prop_get(const void* pThis) const\
{\
return (OdRxObject*)OdRxVariantValue((static_cast<PropHolder*>((OdRxDictionary*)pThis))->getMethodName());\
}\
void ClassPrefix _##PropName##_PropDesc::prop_put(void* pThis, OdRxObject* pVal)\
{\
(static_cast<PropHolder*>((OdRxDictionary*)pThis))->putMethodName(OdRxVariantValue(pVal)->accessFn());\
}

Definition at line 227 of file RxDispatchImpl.h.

◆ ODRX_DEFINE_PROPERTY_OBJECT

#define ODRX_DEFINE_PROPERTY_OBJECT (   PropName,
  PropHolder,
  getMethodName,
  putMethodName,
  ObjType 
)
Value:
OdRxObjectPtr _##PropName##_PropDesc::createObject()\
{\
return OdRxObjectPtr(new _##PropName##_PropDesc, kOdRxObjAttach);\
}\
OdString _##PropName##_PropDesc::_name()\
{\
static OdString sName(OD_T(#PropName));\
return sName;\
}\
OdString _##PropName##_PropDesc::name() const \
{\
return _name();\
}\
OdRxObjectPtr _##PropName##_PropDesc::prop_get(const void* pThis) const\
{\
return static_cast<PropHolder*>((OdRxDictionary*)pThis)->getMethodName();\
}\
void _##PropName##_PropDesc::prop_put(void* pThis, OdRxObject* pVal)\
{\
static_cast<PropHolder*>((OdRxDictionary*)pThis)->putMethodName(OdSmartPtr<ObjType>(pVal));\
}

Definition at line 264 of file RxDispatchImpl.h.

◆ ODRX_DEFINE_PROPERTY_OBJECT2

#define ODRX_DEFINE_PROPERTY_OBJECT2 (   PropName,
  SrcFileName,
  PropHolder,
  getMethodName,
  putMethodName,
  ObjType 
)
Value:
OdRxObjectPtr _##PropName##_##SrcFileName##_PropDesc::createObject()\
{\
return OdRxObjectPtr(new _##PropName##_##SrcFileName##_PropDesc, kOdRxObjAttach);\
}\
OdString _##PropName##_##SrcFileName##_PropDesc::_name()\
{\
static OdString sName(OD_T(#PropName));\
return sName;\
}\
OdString _##PropName##_##SrcFileName##_PropDesc::name() const \
{\
return _name();\
}\
OdRxObjectPtr _##PropName##_##SrcFileName##_PropDesc::prop_get(const void* pThis) const\
{\
return static_cast<PropHolder*>((OdRxDictionary*)pThis)->getMethodName();\
}\
void _##PropName##_##SrcFileName##_PropDesc::prop_put(void* pThis, OdRxObject* pVal)\
{\
static_cast<PropHolder*>((OdRxDictionary*)pThis)->putMethodName(OdSmartPtr<ObjType>(pVal));\
}

Definition at line 287 of file RxDispatchImpl.h.

◆ ODRX_DEFINE_PROPERTY_OBJECT_PREFIX

#define ODRX_DEFINE_PROPERTY_OBJECT_PREFIX (   ClassPrefix,
  PropName,
  PropHolder,
  getMethodName,
  putMethodName,
  ObjType 
)
Value:
OdRxObjectPtr ClassPrefix _##PropName##_PropDesc::createObject()\
{\
return OdRxObjectPtr(new _##PropName##_PropDesc, kOdRxObjAttach);\
}\
OdString ClassPrefix _##PropName##_PropDesc::_name()\
{\
static OdString sName(OD_T(#PropName));\
return sName;\
}\
OdString ClassPrefix _##PropName##_PropDesc::name() const \
{\
return _name();\
}\
OdRxObjectPtr ClassPrefix _##PropName##_PropDesc::prop_get(const void* pThis) const\
{\
return static_cast<PropHolder*>((OdRxDictionary*)pThis)->getMethodName();\
}\
void ClassPrefix _##PropName##_PropDesc::prop_put(void* pThis, OdRxObject* pVal)\
{\
static_cast<PropHolder*>((OdRxDictionary*)pThis)->putMethodName(OdSmartPtr<ObjType>(pVal));\
}

Definition at line 310 of file RxDispatchImpl.h.

◆ ODRX_DEFINE_PROPERTY_PREFIX

#define ODRX_DEFINE_PROPERTY_PREFIX (   ClassPrefix,
  PropName,
  PropHolder,
  accessFn 
)    ODRX_DEFINE_PROPERTY_METHODS_PREFIX(ClassPrefix, PropName, PropHolder, get_##PropName, put_##PropName, accessFn)

Definition at line 260 of file RxDispatchImpl.h.

◆ ODRX_END_DYNAMIC_PROPERTY_MAP

#define ODRX_END_DYNAMIC_PROPERTY_MAP (   CLASS)
Value:
}\
OdRxDictionary* CLASS::propertiesInfo() const\
{\
static OdRxDictionaryPtr pInfo;\
if(pInfo.isNull())\
{\
generatePropMap(pInfo);\
}\
return pInfo.get();\
}
FIRSTDLL_EXPORT OdRxDictionaryPtr odrxCreateRxDictionary()

Definition at line 143 of file RxDispatchImpl.h.

◆ ODRX_GENERATE_PROPERTY

#define ODRX_GENERATE_PROPERTY (   PropName)     pInfo->putAt(_##PropName##_PropDesc::_name(), _##PropName##_PropDesc::createObject());

Definition at line 250 of file RxDispatchImpl.h.

◆ ODRX_GENERATE_PROPERTY2

#define ODRX_GENERATE_PROPERTY2 (   PropName,
  SrcFileName 
)     pInfo->putAt(_##PropName##_##SrcFileName##_PropDesc::_name(), _##PropName##_##SrcFileName##_PropDesc::createObject());

Definition at line 253 of file RxDispatchImpl.h.

◆ ODRX_INHERIT_PROPERTIES

#define ODRX_INHERIT_PROPERTIES (   BASE_CLASS)     BASE_CLASS::generatePropMap(pInfo);

Definition at line 155 of file RxDispatchImpl.h.