CFx SDK Documentation  2022 SP0
Macros
IfcRxProperties.h File Reference
#include "IfcCommon.h"
#include "daiRxProperties.h"
#include "IfcValueTypes.h"

Go to the source code of this file.

Macros

#define ODRX_DECLARE_RX_PROPERTY_RO_TREE(Object, Name, Type, Category, Description, HierarchyLevel)
 
#define ODRX_DAI_DECLARE_RX_PROPERTY_COLLECTION_TREE(Object, Name, Type, Category, Description, HierarchyLevel)
 
#define ODRX_DAI_DECLARE_RX_PROPERTY(Object, Name, Type, Category)
 
#define ODRX_DAI_DECLARE_RX_PROPERTY_UI(Object, Name, Type, Category)
 
#define OD_DAI_DEFINE_COLLECTION_TREE_PROPERTY_INTERMEDIARY(Object, Name, IntermediaryPropName)
 
#define OD_DAI_DEFINE_PRIMITIVE_PROPERTY(Object, Name, Type)
 
#define OD_DAI_DEFINE_PRIMITIVE_AGGR_PROPERTY(Object, Name, Type)
 
#define OD_DAI_DEFINE_INV_PRIMITIVE_PROPERTY(Object, Name, Type)
 
#define OD_DAI_DEFINE_INV_PRIMITIVE_AGGR_PROPERTY(Object, Name, Type)
 
#define OD_DAI_DEFINE_ENUM_PROPERTY(Object, Name, Type)
 
#define OD_DAI_DEFINE_SELECT_PROPERTY(Object, Name, Type)
 
#define OD_DAI_DEFINE_SELECT_AGGR_PROPERTY(Object, Name, Type)
 

Macro Definition Documentation

◆ OD_DAI_DEFINE_COLLECTION_TREE_PROPERTY_INTERMEDIARY

#define OD_DAI_DEFINE_COLLECTION_TREE_PROPERTY_INTERMEDIARY (   Object,
  Name,
  IntermediaryPropName 
)

Definition at line 96 of file IfcRxProperties.h.

◆ OD_DAI_DEFINE_ENUM_PROPERTY

#define OD_DAI_DEFINE_ENUM_PROPERTY (   Object,
  Name,
  Type 
)
Value:
OdResult Object ## Name ## Property::subGetValue(const OdRxObject* pO, OdRxValue& value) const\
{\
return eNotApplicable;\
}\
OdResult Object ## Name ## Property::subSetValue(OdRxObject* pO, const OdRxValue& value) const\
{\
return eNotApplicable;\
}
OdResult
Definition: OdResult.h:29
GLsizei const GLfloat * value
Definition: gles2_ext.h:302

Definition at line 225 of file IfcRxProperties.h.

◆ OD_DAI_DEFINE_INV_PRIMITIVE_AGGR_PROPERTY

#define OD_DAI_DEFINE_INV_PRIMITIVE_AGGR_PROPERTY (   Object,
  Name,
  Type 
)
Value:
OdResult Object ## Name ## Property::subGetValue(const OdRxObject* pO, OdRxValue& value) const\
{\
OdSmartPtr<Object> pObj = Object::cast(pO);\
if (pObj.isNull())\
return eNotApplicable;\
Type arr;\
pObj->getInv ## Name ## Aggr (arr);\
value = arr;\
return eOk;\
}\
OdResult Object ## Name ## Property::subSetValue(OdRxObject* pO, const OdRxValue& value) const\
{\
return eNotApplicable;\
}
std::shared_ptr< T > cast(CFxBIMObjectPtr pBase)
Definition: FxBIM.h:167

Definition at line 209 of file IfcRxProperties.h.

◆ OD_DAI_DEFINE_INV_PRIMITIVE_PROPERTY

#define OD_DAI_DEFINE_INV_PRIMITIVE_PROPERTY (   Object,
  Name,
  Type 
)
Value:
OdResult Object ## Name ## Property::subGetValue(const OdRxObject* pO, OdRxValue& value) const\
{\
OdSmartPtr<Object> pObj = Object::cast(pO);\
if (pObj.isNull())\
return eNotApplicable;\
value = pObj->getInv ## Name(); \
return eOk;\
}\
OdResult Object ## Name ## Property::subSetValue(OdRxObject* pO, const OdRxValue& value) const\
{\
return eNotApplicable;\
}

Definition at line 195 of file IfcRxProperties.h.

◆ OD_DAI_DEFINE_PRIMITIVE_AGGR_PROPERTY

#define OD_DAI_DEFINE_PRIMITIVE_AGGR_PROPERTY (   Object,
  Name,
  Type 
)
Value:
OdResult Object ## Name ## Property::subGetValue(const OdRxObject* pO, OdRxValue& value) const\
{\
OdSmartPtr<Object> pObj = Object::cast(pO);\
if (pObj.isNull())\
return eNotApplicable;\
Type arr;\
pObj->get ## Name ## Aggr (arr);\
value = arr;\
return eOk;\
}\
OdResult Object ## Name ## Property::subSetValue(OdRxObject* pO, const OdRxValue& value) const\
{\
OdSmartPtr<Object> pObj = Object::cast(pO);\
if (pObj.isNull())\
return eNotApplicable;\
const Type *pVal = rxvalue_cast<Type>(&value);\
if (pVal)\
{\
pObj->set ## Name ## Aggr (*pVal);\
return eOk;\
}\
return eNotApplicable;\
}

Definition at line 170 of file IfcRxProperties.h.

◆ OD_DAI_DEFINE_PRIMITIVE_PROPERTY

#define OD_DAI_DEFINE_PRIMITIVE_PROPERTY (   Object,
  Name,
  Type 
)
Value:
OdResult Object ## Name ## Property::subGetValue(const OdRxObject* pO, OdRxValue& value) const\
{\
OdSmartPtr<Object> pObj = Object::cast(pO);\
if (pObj.isNull())\
return eNotApplicable;\
value = pObj->get ## Name ();\
return eOk;\
}\
OdResult Object ## Name ## Property::subSetValue(OdRxObject* pO, const OdRxValue& value) const\
{\
OdSmartPtr<Object> pObj = Object::cast(pO);\
if (pObj.isNull())\
return eNotApplicable;\
const Type *pVal = rxvalue_cast<Type>(&value);\
if (pVal)\
{\
pObj->set ## Name (*pVal);\
return eOk;\
}\
return eNotApplicable;\
}

Definition at line 147 of file IfcRxProperties.h.

◆ OD_DAI_DEFINE_SELECT_AGGR_PROPERTY

#define OD_DAI_DEFINE_SELECT_AGGR_PROPERTY (   Object,
  Name,
  Type 
)
Value:
OdResult Object ## Name ## Property::subGetValue(const OdRxObject* pO, OdRxValue& value) const\
{\
return eNotApplicable;\
}\
OdResult Object ## Name ## Property::subSetValue(OdRxObject* pO, const OdRxValue& value) const\
{\
return eNotApplicable;\
}

Definition at line 245 of file IfcRxProperties.h.

◆ OD_DAI_DEFINE_SELECT_PROPERTY

#define OD_DAI_DEFINE_SELECT_PROPERTY (   Object,
  Name,
  Type 
)
Value:
OdResult Object ## Name ## Property::subGetValue(const OdRxObject* pO, OdRxValue& value) const\
{\
return eNotApplicable;\
}\
OdResult Object ## Name ## Property::subSetValue(OdRxObject* pO, const OdRxValue& value) const\
{\
return eNotApplicable;\
}

Definition at line 235 of file IfcRxProperties.h.

◆ ODRX_DAI_DECLARE_RX_PROPERTY

#define ODRX_DAI_DECLARE_RX_PROPERTY (   Object,
  Name,
  Type,
  Category 
)
Value:
struct Object ## Name ## Property : OdRxProperty {\
static OdRxMemberPtr createObject(const OdRxClass* owner)\
{\
((Object ## Name ## Property*)res.get())->init(__OD_T(#Name), &OdRxValueType::Desc<Type>::value(), owner);\
if( OdString::kEmpty != Category ) \
((Object ## Name ## Property*)res.get())->attributes().add(OdRxUiPlacementAttribute::createObject(OD_T(Category), 1)); \
return res;\
}\
}
#define OD_T(x)
#define __OD_T(x)
#define ODRX_OVERRIDE
OdResult add(const OdRxAttribute *attribute)
const OdRxObject * owner() const
void init(const OdString &name, const OdRxValueType *type, const OdRxObject *owner=0)
const OdRxAttributeCollection & attributes() const
static OdSmartPtr< TInterface > createObject()
Definition: RxObjectImpl.h:107
virtual OdResult subSetValue(OdRxObject *pO, const OdRxValue &value) const
virtual OdResult subGetValue(const OdRxObject *pO, OdRxValue &value) const
static OdRxAttributePtr createObject(const OdString &category, unsigned int weight)
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
Definition: OdString.h:98
static const OdRxValueType & value()

Definition at line 70 of file IfcRxProperties.h.

◆ ODRX_DAI_DECLARE_RX_PROPERTY_COLLECTION_TREE

#define ODRX_DAI_DECLARE_RX_PROPERTY_COLLECTION_TREE (   Object,
  Name,
  Type,
  Category,
  Description,
  HierarchyLevel 
)
Value:
struct Object ## Name ## Property : OdRxCollectionProperty {\
static OdRxMemberPtr createObject(const OdRxClass* owner)\
{\
((Object ## Name ## Property*)res.get())->init(__OD_T(#Name), &OdRxValueType::Desc<Type>::value(), owner);\
((Object ## Name ## Property*)res.get())->attributes().add(OdIfcRxDisplayAsAttribute::createObject(false, true)); \
if( OdString::kEmpty != Description ) \
((Object ## Name ## Property*)res.get())->attributes().add(OdRxDescriptionAttribute::createObject(OD_T(Description))); \
if( OdString::kEmpty != Category ) \
((Object ## Name ## Property*)res.get())->attributes().add(OdRxUiPlacementAttribute::createObject(OD_T(Category), 1)); \
if( OdString::kEmpty != HierarchyLevel ) \
((Object ## Name ## Property*)res.get())->attributes().add(OdIfcRxHierarchyLevelAttribute::createObject()); \
return res;\
}\
virtual OdResult subTryGetCount(const OdRxObject* pO, int& count) const ODRX_OVERRIDE;\
}
static OdRxAttributePtr createObject(bool bSetIndex, bool bSetName)
virtual OdResult subTryGetCount(const OdRxObject *pO, int &count) const
void init(const OdString &name, const OdRxValueType *type, const OdRxObject *owner=0)
virtual OdRxValueIteratorPtr subNewValueIterator(const OdRxObject *pO) const
static OdRxAttributePtr createObject(const OdString &description, unsigned int id=0, unsigned int sourceHint=0)
static OdRxAttributePtr createObject(const OdString &value)
GLsizei GLsizei * count
Definition: gles2_ext.h:276

Definition at line 51 of file IfcRxProperties.h.

◆ ODRX_DAI_DECLARE_RX_PROPERTY_UI

#define ODRX_DAI_DECLARE_RX_PROPERTY_UI (   Object,
  Name,
  Type,
  Category 
)
Value:
struct Object ## Name ## Property : OdRxProperty {\
static OdRxMemberPtr createObject(const OdRxClass* owner)\
{\
((Object ## Name ## Property*)res.get())->init(__OD_T(#Name), &OdRxValueType::Desc<Type>::value(), owner);\
if( OdString::kEmpty != Category ) \
((Object ## Name ## Property*)res.get())->attributes().add(OdRxUiPlacementAttribute::createObject(OD_T(Category), 1)); \
return res;\
}\
}

Definition at line 83 of file IfcRxProperties.h.

◆ ODRX_DECLARE_RX_PROPERTY_RO_TREE

#define ODRX_DECLARE_RX_PROPERTY_RO_TREE (   Object,
  Name,
  Type,
  Category,
  Description,
  HierarchyLevel 
)
Value:
struct Object ## Name ## Property : OdRxProperty {\
static OdRxMemberPtr createObject(const OdRxClass* owner)\
{\
((Object ## Name ## Property*)res.get())->init(__OD_T(#Name), &OdRxValueType::Desc<Type>::value(), owner);\
if( OdString::kEmpty != Description ) \
((Object ## Name ## Property*)res.get())->attributes().add(OdRxDescriptionAttribute::createObject(OD_T(Description))); \
if( OdString::kEmpty != Category ) \
((Object ## Name ## Property*)res.get())->attributes().add(OdRxUiPlacementAttribute::createObject(OD_T(Category), 1)); \
if( OdString::kEmpty != HierarchyLevel ) \
((Object ## Name ## Property*)res.get())->attributes().add(OdIfcRxHierarchyLevelAttribute::createObject()); \
return res;\
}\
virtual bool isReadOnly(const OdRxObject*) const ODRX_OVERRIDE { return true; }\
}
virtual bool isReadOnly(const OdRxObject *pO) const

Definition at line 32 of file IfcRxProperties.h.