/////////////////////////////////////////////////////////////////////////////// // 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_DATAPROPERTY_H__ #define __TNW_DATAPROPERTY_H__ #include "NwObject.h" #include "NwExport.h" #include "NwDataType.h" class OdNwVariant; class OdNwName; /** \details This template class is a specialization of the OdSmartPtr class for OdNwName object pointers. */ typedef OdSmartPtr OdNwNamePtr; /** \details This class represents a named property with data. */ class NWDBEXPORT OdNwDataProperty : public OdNwObject { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwDataProperty); //DOM-IGNORE-END protected: /** \details Default constructor. Creates a new OdNwDataProperty object. */ OdNwDataProperty(); public: /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwDataProperty(); public: /** \details Receives the display name of the property. \returns Display name of the property as an OdString object. */ virtual OdString getDisplayName() const = 0; /** \details Receives the name of the property. \returns Name of the property as an OdString object. */ virtual OdString getName() const = 0; /** \details Receives the type of the property's value. \returns Type of the property's value as one of the enumerated items from the NwDataType::Enum enumerated type. \remarks Type can be one of the following: Name Value Description NwDataType::dt_NONE 0 Default value type. NwDataType::dt_DOUBLE 0x01 Double value type. NwDataType::dt_INT32 0x02 32-bit integer value type. NwDataType::dt_BOOL 0x03 Boolean value type. NwDataType::dt_DISPLAY_STRING 0x04 Display end-user string value type. NwDataType::dt_DATETIME 0x05 Date time value type. NwDataType::dt_DOUBLE_LENGTH 0x06 Double value type for length (in length's units). NwDataType::dt_DOUBLE_ANGLE 0x07 Double value type for angle (in radians). NwDataType::dt_NAME 0x08 Name value type (with pointer to OdNwName object). NwDataType::dt_IDENTIFIER_STRING 0x09 Programmatic identifier string value type. NwDataType::dt_DOUBLE_AREA 0x0A Double value type for area. NwDataType::dt_DOUBLE_VOLUME 0x0B Double value type for volume. NwDataType::dt_POINT3D 0x0C Point3d value type. NwDataType::dt_POINT2D 0x0D Point2d value type.
*/ virtual NwDataType::Enum getDataType() const = 0; /** \details Gets a value of the property. \param val [out] OdNwVariant object with the returned property's value. \returns The eOk value if the property value is returned successfully, or an appropriate error code otherwise. \remarks OdNwVariant::Type of val can be one of the following: Name Value Description OdVariant::Type::kVoid 0 Default value type. 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::kPoint2d 0x0E A 2D 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.
*/ virtual OdResult getValue(OdNwVariant& val) const = 0; }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwDataProperty object pointers. */ typedef OdSmartPtr OdNwDataPropertyPtr; #endif //__TNW_DATAPROPERTY_H__