/////////////////////////////////////////////////////////////////////////////// // 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 _PRCBODY_INCLUDED_ #define _PRCBODY_INCLUDED_ #include "PrcObjectId.h" #include "Gi/GiDrawable.h" SMARTPTR(OdPrcBody); class OdPrcBodyImpl; /** \details An abstract class that provides an interface for storing and handling common information about a PRC body. */ class PRC_TOOLKIT OdPrcBody : public OdGiDrawable { protected: OdPrcBody(OdPrcBodyImpl *pImpl); public: //DOM-IGNORE-BEGIN ODPRC_DECLARE_MEMBERS_BASE_NOTYPE(OdPrcBody) //DOM-IGNORE-END /** \details Destroys the PRC body object. */ virtual ~OdPrcBody(); /** \details Reads PRC body information from an and returns the PRC . \param pStream [in] A pointer to a to read PRC body data from. \returns The of the created PRC body object. */ static OdPrcObjectId read(OdPrcCompressedFiler *pStream); /** \details Reads data of PRC bodies from an and stores of created PRC body objects in an . \param array [out] A reference to an object that stores the array of of created PRC body objects are stored. \param pStream [in] A pointer to a to read PRC body data from. */ static void readArray(OdPrcObjectIdArray &array, OdPrcCompressedFiler *pStream); /** \details Sets the of the PRC body object. \param stub [in] A pointer to an OdDbStub object that is used to create the PRC body object . */ void setObjectId (OdDbStub* stub); /** \details Requests the PRC body object . \returns A constant reference to an object that stores the PRC body object identifier value. \remarks Since the PRC body object is returned via a constant reference, you can call the method to restrict any modification of the outside the PRC body object. */ const OdPrcObjectId& objectId() const; /** \details Requests the PRC body's serial type. \returns An unsigned 32-bit integer value that contains the serial type. */ virtual OdUInt32 getSerialType() const = 0; public: /** \details Checks whether the PRC body is persistent. \returns true if the PRC body object is persistent; otherwise, the method returns false. */ virtual bool isPersistent() const; /** \details Requests the PRC body identifier. \returns A raw pointer to the OdDbStub object that represents the PRC body identifier. */ virtual OdDbStub* id() const; /** \details Sets a new graphical system cache object for the PRC body. \param pGsNode [in] A pointer to a new graphical system cache object to be set. */ virtual void setGsNode(OdGsCache* pGsNode); /** \details Requests the graphical system cache object associated with the PRC body object. \returns A raw pointer to the current graphical system cache object for the PRC body. */ virtual OdGsCache* gsNode() const; protected: virtual OdUInt32 subSetAttributes (OdGiDrawableTraits * traits) const; virtual bool subWorldDraw (OdGiWorldDraw * wd) const; virtual void subViewportDraw (OdGiViewportDraw * vd) const; }; #endif // _PRCBODY_INCLUDED_