/////////////////////////////////////////////////////////////////////////////// // 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. /////////////////////////////////////////////////////////////////////////////// #pragma once #include "MaterialReaderExport.h" #include "RxVariant.h" #include "Enums.h" #include "RxObjectImpl.h" /** \details A class that represents a property for storing specific values. */ struct MATERIALREADER_EXPORT OdAProperty : public OdRxObjectImpl { ODRX_DECLARE_MEMBERS(OdAProperty); /** \details Get the value of a property. \returns value as OdVariant. */ virtual const OdVariant& getValue() const = 0; /** \details Get property values. \returns values as an array of OdVariant. */ virtual const OdArray& getValues() const = 0; /** \details Get the property name. \returns name as OdString. */ virtual const OdString& getName() const = 0; /** \details Get the names of all attached assets \returns array of names. */ virtual const OdStringArray& getConnectedAssets() const = 0; /** \details Get the measurement unit of values in a property. \returns UnitEnum. */ virtual const UnitEnum getUnitType() const = 0; /** \details Get all attached assets. \returns array of assets. */ virtual const OdRxObjectPtrArray getAConnected() const = 0; /** \details Set a name for a property. \param value [in] The name to be set for the property. */ virtual void setName(const OdString& value) = 0; /** \details Set a value for a property. \param value [in] The value to be set for the property. */ virtual void setValue(const OdVariant& value) = 0; /** \details Set values for a property. \param value [in] The values to be set for the property. */ virtual void setValue(const OdArray& value) = 0; /** \details Set the measurement unit of a property value. \param UnitEnum [in] The measurement unit to be set for the property. */ virtual void setUnits(const UnitEnum) = 0; /** \details Set refer to an asset by name. \param OdStringArray [in] Names of assets to which the property will be attached. */ virtual void setConnectedAssetsNames(const OdStringArray&) = 0; /** \details Set refer to an asset. \param OdRxObjectPtrArray [in] array of assets. */ virtual void setConnectedAssets(const OdRxObjectPtrArray&) = 0; /** \details Set refer to an asset. \param OdRxObjectPtr [in] The asset. */ virtual void setConnectedAssets(const OdRxObjectPtr&) = 0; /** \details Add refer to an asset. \param OdRxObjectPtr [in] The asset. \remarks Links a asset, but does not remove the old one. Therefore, there can be two linked assets in the list. */ virtual void appendConnectedAssets(const OdRxObjectPtr&) = 0; /** \details Clear property. */ virtual void clear() = 0; /** \details Clear connected properties. */ virtual void clearConnected() = 0; }; typedef OdSmartPtr OdAPropertyPtr; typedef OdArray OdAPropertyPtrArray;