/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef _IFC_PROPERTY_SET_FILLER_H #define _IFC_PROPERTY_SET_FILLER_H #include "IfcBuilder.h" #include "IfcSimpleTypes.h" #include "TD_PackPush.h" class OdIfcModelFiller; /** \details Sub class of IfcBuilder that provides independent property set creation operations. */ class IFCCORE_EXPORT IfcPropertySetFiller : public IfcBuilder { protected: static OdSmartPtr createObject( OdIfcModelFiller *filler, OdIfc::OdIfcInstancePtr objectDefinition); OdIfc::OdIfcInstancePtr m_objectDefinition; OdIfc::OdIfcInstancePtr m_propertySet; OdDAIObjectIds m_idProperties; public: ODRX_DECLARE_MEMBERS(IfcPropertySetFiller); /** details Retrieves object definition associated with this instance. \returns smart pointer to object definition instance. */ OdIfc::OdIfcInstancePtr getObjectDefinition() { return m_objectDefinition; }; /** details Retrieves property set associated with this instance. \returns smart pointer to a property set. */ OdIfc::OdIfcInstancePtr getPropertySet() { return m_propertySet; }; /** \details Creates an instance of IfcPropertySingleValue element with appropriate IfcType and name. \param name [in] OdAnsiString as name of property. \param val [in] OdRxValue as property value. \param typePath [in] OdAnsiString as property IFC name type. \returns A reference to the current IfcPropertySetFiller. */ IfcPropertySetFiller& appendPropertySingleValue(const OdAnsiString &name, OdRxValue val, const OdAnsiString &typePath); /** \details Creates an instance of IfcPropertySet element and IfcRelDefinesByProperties based on m_objectDefinition and m_idProperties set. \param name [in] OdAnsiString as name of property set. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createRelDefinesPropertySet(const OdAnsiString &name); /** \details Creates an instance of IfcPropertySet element based m_idProperties properties. \param name [in] OdAnsiString as name of property set. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createPropertySet(const OdAnsiString& name); /** \details Creates an instance of IfcPropertySingleValue element with appropriate IfcType and name. \param IfcType [in] OdAnsiString as name of IFC measure type (IfcVolumeMeasure). \param name [in] OdString as property name. \param value [in] TValueType as property value. \returns A reference to the current IfcPropertySetFiller. */ template IfcPropertySetFiller& appendPropertySingleValue(const OdAnsiString& IfcType, const OdString& name, const TValueType& value) { OdIfc::OdIfcInstancePtr ptrProperty = createPropertySingleValue(name); { OdRxValue boolVal; boolVal << value; OdRxSpecifiedValueType specsType(OdRxValueType::Desc::value(), IfcType); OdRxValue nominalValue(specsType, boolVal); ptrProperty->putAttrCaseInsensitive("NominalValue", nominalValue); } return *this; } /** \details Creates an instance of IfcPropertySingleValue by its name and value. \param name [in] OdString as property name. \param value [in] IfcLabel as property value. \returns A reference to the current IfcPropertySetFiller. */ IfcPropertySetFiller& appendPropertySingleValue(const OdString& name, const OdIfc::IfcLabel& value); /** \details Creates an instance of IfcPropertySingleValue by its name and value. \param name [in] OdString as property name. \param value [in] IfcBoolean as property value. \returns A reference to the current IfcPropertySetFiller. */ IfcPropertySetFiller& appendPropertySingleValue(const OdString & name, const OdIfc::IfcBoolean & value); /** \details Creates an instance of IfcPropertySingleValue by its name and value. \param name [in] OdString as property name. \param value [in] IfcInteger as property value. \returns A reference to the current IfcPropertySetFiller. */ IfcPropertySetFiller& appendPropertySingleValue(const OdString & name, const OdIfc::IfcInteger & value); /** \details Creates an instance of IfcPropertySingleValue by its name and value. \param name [in] OdString as property name. \param value [in] IfcReal as property value. \returns A reference to the current IfcPropertySetFiller. */ IfcPropertySetFiller& appendPropertySingleValue(const OdString & name, const OdIfc::IfcReal & value); /** \details Creates an instance of IfcPropertySingleValue by its name and value. \param name [in] OdString as property name. \param value [in] IfcLogical as property value. \returns A reference to the current IfcPropertySetFiller. */ IfcPropertySetFiller& appendPropertySingleValue(const OdString & name, const OdIfc::IfcLogical & value); /** \details Creates an instance of IfcPropertySingleValue by its name and value. \param name [in] OdString as property name. \param value [in] OdString as property value. \returns A reference to the current IfcPropertySetFiller. */ IfcPropertySetFiller& appendPropertySingleValue(const OdString & name, const OdString & value); /** \details Creates an instance of IfcPropertySingleValue by its name. \param name [in] OdString as property name. \returns A reference to the current IfcPropertySetFiller. */ IfcPropertySetFiller& appendPropertySingleValue(const OdString & name); /** \details Creates an instance of IfcPropertySingleValue by its name. \param name [in] OdString as property name. \returns A pointer to the created and appended to the model entity. */ OdIfc::OdIfcInstancePtr createPropertySingleValue(const OdString & name); friend class OdIfcModelFiller; }; /** \details A data type that represents a smart pointer to an IfcPropertySetFiller object. */ typedef OdSmartPtr IfcPropertySetFillerPtr; #include "TD_PackPop.h" #endif // _IFC_PROPERTY_SET_FILLER_H