CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Macros | Functions
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
 
class  OdRxWrapper< Type >
 
class  OdRxWrapperValue< Type >
 

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)
 

Functions

template<class T >
OdRxWrapperValue< T > createRxWrapper (const T &val)
 

Macro Definition Documentation

◆ ODRX_BEGIN_DYNAMIC_PROPERTY_MAP

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

Definition at line 150 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 146 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 179 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 190 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 276 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 278 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 201 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 224 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 247 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 284 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 307 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 330 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 280 of file RxDispatchImpl.h.

◆ ODRX_END_DYNAMIC_PROPERTY_MAP

#define ODRX_END_DYNAMIC_PROPERTY_MAP (   CLASS)
Value:
}\
static OdMutex _##CLASS##PropMapMutex;\
OdRxDictionary* CLASS::propertiesInfo() const\
{\
TD_AUTOLOCK(_##CLASS##PropMapMutex);\
static OdRxDictionaryPtr pInfo = createPropMap();\
return pInfo.get();\
}
const T * get() const
Definition: SmartPtr.h:339

Definition at line 164 of file RxDispatchImpl.h.

◆ ODRX_GENERATE_PROPERTY

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

Definition at line 270 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 273 of file RxDispatchImpl.h.

◆ ODRX_INHERIT_PROPERTIES

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

Definition at line 175 of file RxDispatchImpl.h.

Function Documentation

◆ createRxWrapper()

template<class T >
OdRxWrapperValue< T > createRxWrapper ( const T &  val)

Definition at line 382 of file RxDispatchImpl.h.