CFx SDK Documentation  2020SP3
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;\
}

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;\
}

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;\
}\
}

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;\
}

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; }\
}

Definition at line 32 of file IfcRxProperties.h.

OdResult
OdResult
Definition: OdResult.h:29
OdRxCollectionProperty::subNewValueIterator
virtual OdRxValueIteratorPtr subNewValueIterator(const OdRxObject *pO) const
OdPdfPublish::Action::Type
Type
Definition: PdfPublishCommon.h:444
OdRxUiPlacementAttribute::createObject
static OdRxAttributePtr createObject(const OdString &category, unsigned int weight)
OdIfcRxDisplayAsAttribute::createObject
static OdRxAttributePtr createObject(bool bSetIndex, bool bSetName)
OdRxMember::owner
const OdRxObject * owner() const
count
GLsizei GLsizei * count
Definition: gles2_ext.h:276
OdRxMember::init
void init(const OdString &name, const OdRxValueType *type, const OdRxObject *owner=0)
OdRxObject
Definition: RxObject.h:564
__OD_T
#define __OD_T(x)
Definition: OdPlatformSettings.h:718
OdRxHierarchyLevelAttribute::createObject
static OdRxAttributePtr createObject(const OdString &value)
OdRxDescriptionAttribute::createObject
static OdRxAttributePtr createObject(const OdString &description, unsigned int id=0, unsigned int sourceHint=0)
OdRxValue
Definition: RxValue.h:64
OdRxValueType::Desc::value
static const OdRxValueType & value()
OD_T
#define OD_T(x)
Definition: OdPlatformSettings.h:714
OdRxClass
Definition: RxObject.h:865
OdRxMember::attributes
const OdRxAttributeCollection & attributes() const
OdSmartPtr
Definition: SmartPtr.h:58
OdRxProperty
Definition: RxProperty.h:86
OdRxCollectionProperty::init
void init(const OdString &name, const OdRxValueType *type, const OdRxObject *owner=0)
OdRxProperty::subGetValue
virtual OdResult subGetValue(const OdRxObject *pO, OdRxValue &value) const
FxBIM::cast
std::shared_ptr< T > cast(CFxBIMObjectPtr pBase)
Definition: FxBIM.h:142
OdRxProperty::subSetValue
virtual OdResult subSetValue(OdRxObject *pO, const OdRxValue &value) const
OdPdfPublish::eOk
@ eOk
Definition: PdfPublishCommon.h:42
OdGiVisualStyleProperties::Property
Property
Definition: GiVisualStyle.h:734
OdRxObjectImpl::createObject
static OdSmartPtr< TInterface > createObject()
Definition: RxObjectImpl.h:107
value
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
OdRxAttributeCollection::add
OdResult add(const OdRxAttribute *attribute)
OdRxCollectionProperty::subTryGetCount
virtual OdResult subTryGetCount(const OdRxObject *pO, int &count) const
OdString::kEmpty
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
Definition: OdString.h:98
ODRX_OVERRIDE
#define ODRX_OVERRIDE
Definition: OdPlatformSettings.h:114
OdRxCollectionProperty
Definition: RxProperty.h:174
OdRxPropertyBase::isReadOnly
virtual bool isReadOnly(const OdRxObject *pO) const