/////////////////////////////////////////////////////////////////////////////// // 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 _PRCMARKUP_INCLUDED_ #define _PRCMARKUP_INCLUDED_ #include "PrcObjectId.h" #include "PrcBaseWithGraphics.h" #include "PrcUserData.h" #include "PrcBaseTessData.h" SMARTPTR(OdPrcMarkup); /** \details The class stores and handles markup data. */ class PRC_TOOLKIT OdPrcMarkup : public OdPrcBaseWithGraphics { public: //DOM-IGNORE-BEGIN ODPRC_DECLARE_MEMBERS_PRCBASE(OdPrcMarkup); //DOM-IGNORE-END /** \details Requests the common tessellation data of the object. \returns A smart pointer to an object that contains the markup common tessellation data. \remarks The object is returned via a reference, and therefore any modification of this object causes the object tessellation data to be changed as well. To restrict modifications of the outside the markup object, call another method that returns a constant reference. */ OdPrcBaseTessDataPtr &tessellation(); /** \details Requests the common tessellation data of the object. \returns A smart pointer to an object that contains the markup common tessellation data. */ const OdPrcBaseTessDataPtr &tessellation() const; /** \details Requests the current user-defined data from the object. \returns An object that contains the user-defined data. \remarks User data is returned as a reference to an object, and therefore it can be used to set new user data. To restrict modifications of the user data outside the object, call another method that returns a constant reference. */ OdPrcUserData &userData(); /** \details Requests the current user-defined data from the object. \returns An object that contains the user-defined data. */ const OdPrcUserData &userData() const; /** \details Requests leaders. \returns An that refer to the leader objects. \remarks The is returned via a reference, and therefore any modification of the returned array causes the list of leaders to be changed as well. To restrict modifications of the outside the object, call another method that returns a constant reference. */ OdPrcObjectIdArray &leader(); /** \details Requests leaders. \returns An that refer to the leader objects. */ const OdPrcObjectIdArray &leader() const; /** \details Requests linked items. \returns An that refer to the linked items. \remarks The is returned via a reference, and therefore any modification of the returned array causes the list of linked items to be changed as well. To restrict modifications of the outside the object, call another method that returns a constant reference. */ OdPrcObjectIdArray &linkedItem(); /** \details Requests linked items. \returns An that refer to the linked items. */ const OdPrcObjectIdArray &linkedItem() const; /** \details Enumeration represents supported markup types according to the ISO standard. */ enum MarkupType { /** Unknown type.*/ kUnknown = 0, /** Plain text.*/ kText, /** Dimension.*/ kDimension, /** Arrow.*/ kArrow, /** Balloon.*/ kBalloon, /** Circle's center.*/ kCircleCenter, /** Coordinate.*/ kCoordinate, /** Datum.*/ kDatum, /** Fastener.*/ kFastener, /** Geometric Dimensioning and Tolerance Block.*/ kGdt, /** Locator.*/ kLocator, /** Measurement point.*/ kMeasurementPoint, /** Roughness.*/ kRoughness, /** Welding.*/ kWelding = 13, /** Table.*/ kTable = 15, /** Other type.*/ kOther }; /** \details Enumeration represents supported markup subtypes. */ enum MarkupSubType { /** Unknown subtype.*/ kUnknownSubtype = 0, /** For internal use.*/ kEnumMax, /** Datum identifier subtype */ kDatum_Ident = 1, /** Datum target subtype */ kDatum_Target = 2, /** For internal use.*/ kDatum_EnumMax, /** Distance dimension subtype */ kDimension_Distance = 1, /** Dimension offset distance subtype */ kDimension_Distance_Offset = 2, /** Dimension cumulative distance subtype */ kDimension_Distance_Cumulate = 3, /** Dimension chamfer callout subtype */ kDimension_Chamfer = 4, /** Dimension slope subtype */ kDimension_Slope = 5, /** Dimension ordinate subtype */ kDimension_Ordinate = 6, /** Dimension radius subtype */ kDimension_Radius = 7, /** Tangent radius dimension subtype */ kDimension_Radius_Tangent = 8, /** Cylinder radius dimension subtype */ kDimension_Radius_Cylinder = 9, /** Radius edge dimension subtype */ kDimension_Radius_Edge = 10, /** Diameter dimension subtype */ kDimension_Diameter = 11, /** Tangent diameter dimension subtype */ kDimension_Diameter_Tangent = 12, /** Cylinder diameter dimension subtype */ kDimension_Diameter_Cylinder = 13, /** Diameter edge dimension subtype */ kDimension_Diameter_Edge = 14, /** Cone diameter dimension subtype */ kDimension_Diameter_Cone = 15, /** Length dimension subtype */ kDimension_Length = 16, /** Curvilinear length dimension subtype */ kDimension_Length_Curvilinear = 17, /** Circular length dimension subtype */ kDimension_Length_Circular = 18, /** Angle dimension subtype */ kDimension_Angle = 19, /** For internal use.*/ kDimension_EnumMax, /** Geometric Dimensioning and Tolerancing subtype */ kGdt_Fcf = 1, /** For internal use.*/ kGdt_EnumMax, /** Welding line subtype */ kWelding_Line = 1, /** Welding spot subtype */ kWelding_Spot = 2, /** For internal use.*/ kWelding_EnumMax, /** Symbol user subtype */ kOther_Symbol_User, /** Symbol utility subtype */ kOther_Symbol_Utility = 2, /** Symbol custom subtype */ kOther_Symbol_Custom = 3, /** Geometric reference subtype */ kOther_GeometricReference = 4, /** For internal use.*/ kOther_EnumMax }; /** \details Sets a new markup type and subtype. \param type [in] A new value to be set. \param subType [in] A new value to be set. \param validate [in] A value of the flag that determines whether the type and subtype validation is enabled (true) or not (false). \returns The eOk value if the type and subtype were successfully set; otherwise, the method returns an appropriate error code. */ OdResult setType(OdPrcMarkup::MarkupType type, OdPrcMarkup::MarkupSubType subType = kUnknownSubtype, bool validate = true); /** \details Requests the current markup type. \returns A value that contains the markup type. */ MarkupType type() const; /** \details Requests the current markup subtype. \returns A value that contains the markup subtype. */ MarkupSubType subType() const; protected: virtual OdUInt32 subSetAttributes (OdGiDrawableTraits * traits) const; virtual bool subWorldDraw (OdGiWorldDraw * pWd) const; virtual void subViewportDraw (OdGiViewportDraw * pVd) const; }; #endif // _PRCMARKUP_INCLUDED_