/////////////////////////////////////////////////////////////////////////////// // 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 _PRCATTRIBUTEENTRY_INCLUDED_ #define _PRCATTRIBUTEENTRY_INCLUDED_ /** \details A class that implements a repository for an attribute title. A title can be represented with a string (user-defined title) or with an integer value (predefined title). */ class PRC_TOOLKIT OdPrcAttributeEntry { private: OdUInt32 m_titleInt; OdString m_titleStr; public: //DOM-IGNORE-BEGIN PRC_DECLARE_CIO(OdPrcAttributeEntry) //DOM-IGNORE-END /** \details Creates a new attribute title object as a copy of another existing attribute title (copy constructor). \param source [in] An attribute title instance to copy from. */ OdPrcAttributeEntry(const OdPrcAttributeEntry &source); /** \details Checks whether the attribute title is a predefined title or not. When an attribute title is a predefined title, its value is represented with an integer value. When at attribute title is not a predefined title (a user-defined title), its value is represented with a string. \return true if the attribute title object represents a predefined attribute title; otherwise, the method returns false. */ bool titleIsInteger() const; /** \details Sets a new value of the user-defined attribute title. \param title [in] A string that contains the new title value to be set. */ void setData (const OdString &title); /** \details Sets a new value of the predefined attribute title. \param titleIdx [in] A value of the that represents the new predefined attribute title. */ void setData (EPRCAttributeEntry titleIdx); /** \details Requests the current value of the user-defined attribute title. \returns A string that contains the title value. */ OdString getTitle() const; /** \details Requests the current value (index) of the predefined attribute title. \returns An value that contains the index of the predefined attribute title. */ EPRCAttributeEntry getIndex() const; /** \details The assignment operator for attribute title objects. \param source [in] Another object to be assigned (the right-hand operand of the assignment operation. \returns A reference to the attribute entry object modified with the assignment operation. */ OdPrcAttributeEntry& operator= (const OdPrcAttributeEntry &source); }; #endif // _PRCATTRIBUTEENTRY_INCLUDED_