/////////////////////////////////////////////////////////////////////////////// // 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 _DAI_ANCHOR_H #define _DAI_ANCHOR_H #include "daiSectionItem.h" #include #include #include "TD_PackPush.h" /** \details Implements the Data Access Interface (DAI) that provides functionality for manipulating data that is defined within the EXPRESS SCHEMA format. */ namespace OdDAI { class Select; class Boolean; class Logical; class Aggr; class Select; class AttributeDataBlock; class Enum; class Anchor; class Number; class Binary; struct EnumValueInfo; /** \details A data type that represents a smart pointer to an object. */ using AnchorPtr = OdSharedPtr; /** \details A data type that represents an section represented with a class instance. */ using AnchorSection = SimpleSectionBase; /** \details The class that implements working with anchor objects. */ class DAI_EXPORT Anchor : public SectionItem { friend class SimpleSectionBase; public: using SectionItem::getValue; using SectionItem::setValue; /** \details Sets a new integer value for the Anchor instance. \param newValue [in] An integer value to be set. */ void setTypedValue(int newValue); /** \details Retrieves the integer value of the Anchor instance. \param valueToGet [out] A placeholder for the requested value. \returns true if the anchor value was successfully converted to the integer data type; otherwise, the method returns false. */ bool getTypedValue(int& valueToGet) const; /** \details Sets a new double value for the Anchor instance. \param newValue [in] A double value to be set. */ void setTypedValue(double newValue); /** \details Retrieves the double value of the Anchor instance. \param valueToGet [out] A placeholder for the requested value. \returns true if the anchor value was successfully converted to the double data type; otherwise, the method returns false. */ bool getTypedValue(double& valueToGet) const; /** \details Sets a new value for the Anchor instance. \param newValue [in] A value to be set. */ void setTypedValue(const Boolean& newValue); /** \details Retrieves the value of the Anchor instance. \param valueToGet [out] A placeholder for the requested value. \returns true if the anchor value was successfully converted to the data type; otherwise, the method returns false. */ bool getTypedValue(Boolean& valueToGet) const; /** \details Sets a new value for the Anchor instance. \param newValue [in] A value to be set. */ void setTypedValue(const Logical& newValue); /** \details Retrieves the value of the Anchor instance. \param valueToGet [out] A placeholder for the requested value. \returns true if the anchor value was successfully converted to the data type; otherwise, the method returns false. */ bool getTypedValue(Logical& valueToGet) const; /** \details Sets a new OdAnsiString value for the Anchor instance. \param newValue [in] An OdAnsiString value to be set. */ void setTypedValue(const OdAnsiString& newValue); /** \details Retrieves the OdAnsiString value of the Anchor instance. \param valueToGet [out] A placeholder for the requested value. \returns true if the anchor value was successfully converted to the OdAnsiString data type; otherwise, the method returns false. */ bool getTypedValue(OdAnsiString& valueToGet) const; /** \details Sets a new value for the Anchor instance. \param newValue [in] A value to be set. */ void setTypedValue(const OdDAIObjectId& newValue); /** \details Retrieves the value of the Anchor instance. \param valueToGet [out] A placeholder for the requested value. \returns true if the anchor value was successfully converted to the data type; otherwise, the method returns false. */ bool getTypedValue(OdDAIObjectId& valueToGet) const; /** \details Sets a new value of the Anchor instance represented with a pointer to an object. \param newValue [in] An object to be set. */ void setTypedValue(const OdDAI::Aggr* newValue); /** \details Retrieves the Anchor instance represented with a pointer to an object. \param valueToGet [out] A placeholder for the requested value. \returns true if the anchor value was successfully converted to a pointer to an object; otherwise, the method returns false. */ bool getTypedValue(OdDAI::Aggr* valueToGet) const; /** \details Sets a new value for the Anchor instance. \param newValue [in] A value to be set. */ void setTypedValue(const OdDAI::AttributeDataBlock& newValue); /** \details Retrieves the value of the Anchor instance. \param valueToGet [out] A placeholder for the requested value. \returns true if the anchor value was successfully converted to the data type; otherwise, the method returns false. */ bool getTypedValue(OdDAI::AttributeDataBlock& valueToGet) const; /** \details Sets a new value for the Anchor instance. \param newValue [in] A value to be set. */ void setTypedValue(const OdDAI::EnumValueInfo& newValue); /** \details Retrieves the value of the Anchor instance. \param valueToGet [out] A placeholder for the requested value. \returns true if the anchor value was successfully converted to the data type; otherwise, the method returns false. */ bool getTypedValue(OdDAI::EnumValueInfo& valueToGet) const; /** \details Sets a new value for the Anchor instance. \param newValue [in] A value to be set. */ void setTypedValue(const Number& newValue); /** \details Retrieves the value of the Anchor instance. \param valueToGet [out] A placeholder for the requested value. \returns true if the anchor value was successfully converted to the data type; otherwise, the method returns false. */ bool getTypedValue(Number& valueToGet) const; /** \details Sets a new value for the Anchor instance. \param newValue [in] A value to be set. */ void setTypedValue(const Binary& newValue); /** \details Retrieves the value of the Anchor instance. \param valueToGet [out] A placeholder for the requested value. \returns true if the anchor value was successfully converted to the data type; otherwise, the method returns false. */ bool getTypedValue(Binary& valueToGet) const; protected: Anchor(const OdAnsiString& name, const OdAnsiString& value, AnchorSection* section); }; } #include "TD_PackPop.h" #endif // _DAI_ANCHOR_H