/////////////////////////////////////////////////////////////////////////////// // 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 __TNW_PROPERTY_ATTRIBUTE_H__ #define __TNW_PROPERTY_ATTRIBUTE_H__ #include "NwAttribute.h" class OdNwDataProperty; class OdNwVariant; /** \details This template class is a specialization of the OdSmartPtr class for OdNwDataProperty object pointers. */ typedef OdSmartPtr OdNwDataPropertyPtr; /** \details This class represents an attribute with set of properties having different value's types. */ class NWDBEXPORT OdNwPropertyAttribute : public OdNwAttribute { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwPropertyAttribute); //DOM-IGNORE-END public: /** \details Default constructor. Creates a new object of the OdNwPropertyAttribute class. */ OdNwPropertyAttribute(); public: /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwPropertyAttribute(); public: /** \details Gets the properties of the attribute as array. \param aProperties [out] OdArray with smart pointers to data properties. \returns The eOk value if the operation is successful, or an appropriate error code otherwise. */ OdResult getProperties(OdArray& aProperties) const; /** \details Adds a new property to the property attribute. \param sName [in] Display name of the property. \param sInternalName [in] Internal name of the property. \param value [in] OdNwVariant with the property value. \param pResCode [out] Pointer to the OdResult object with an error code if the operation is not successful, or eOk if successful. \returns OdSmartPtr object with the new data property. \remarks OdNwVariant::Type of value can be one of the following: Name Value Description OdVariant::Type::kString 0x01 String value type. OdVariant::Type::kBool 0x02 Boolean value type. OdVariant::Type::kInt32 0x05 Integer value type. OdVariant::Type::kInt64 0x05 A time_t value type. OdVariant::Type::kDouble 0x07 Double value type. OdVariant::Type::kRxObjectPtr 0x09 Name value type (with pointer to OdNwName object). OdNwVariant::Type::kPoint3d 0x0D A 3D point data type. OdNwVariant::Type::kAngle 0x0F An angular double type. OdNwVariant::Type::kLength 0x10 A length double type. OdNwVariant::Type::kArea 0x11 An area double type. OdNwVariant::Type::kVolume 0x12 A volume double type.
*/ OdNwDataPropertyPtr addProperty(const OdString& sName, const OdString& sInternalName, const OdNwVariant& value, OdResult* pResCode = NULL); }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwPropertyAttribute object pointers. */ typedef OdSmartPtr OdNwPropertyAttributePtr; #endif //__TNW_PROPERTY_ATTRIBUTE_H__