/////////////////////////////////////////////////////////////////////////////// // 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 _PRCFILESTRUCTURE_INCLUDED_ #define _PRCFILESTRUCTURE_INCLUDED_ #include "PrcSchema.h" #include "PrcFileStructureGlobals.h" #include "PrcFileStructureTree.h" #include "PrcFileStructureTessellation.h" #include "PrcFileStructureGeometry.h" #include "PrcUncompressedFiles.h" class OdPrcHandleTree; class OdPrcStub; class OdPrcFileStructureImpl; SMARTPTR(OdPrcFileStructure); /** \details Class implements storing and handling information about a PRC file structure. Each PRC file structure consists of the following parts: Component Description Header Contains common information about the file structure. Schema Contains information about entities that have been changed between the minimum format version for reading and original author format version. Tree of items Description of the items tree. Each item can be a product occurrence, a part definition, a representation item, or a markup. Tessellation data Contains tessellated data in the leaf items of the structure tree. Global data Coordinate systems, colors, linestyles, and other file structures referenced in this file structure. Exact geometry Exact geometry and topology data of the leaf items of the structure tree. Extra geometry Geometry summary information that can be loaded partially without loading all the geometry.
*/ class PRC_TOOLKIT OdPrcFileStructure : public OdDbBaseDatabase { private: friend class OdPrcSystemInternals; OdPrcFileStructureImpl *m_pImpl; public: //DOM-IGNORE-BEGIN ODPRCRX_DECLARE(OdPrcFileStructure); //DOM-IGNORE-END /** \details Requests the current exact geometry of the file structure. \returns An object that contains the geometry from the file structure. \remarks The method returns the exact geometry via a reference to an object; therefore, any modification affects the file structure object and can be used to set new exact geometry for it. */ OdPrcFileStructureGeometry &fileStructureGeometry(); /** \details Requests the current exact geometry of the file structure. \returns A constant reference to the object that contains the geometry from the file structure. \remarks Call this method to restrict modifications of the returned object outside the file structure object. */ const OdPrcFileStructureGeometry &fileStructureGeometry() const; /** \details Requests the current tessellation data from the file structure. \returns An object that contains the tessellation data from the file structure. \remarks The method returns the tessellation data via a reference to the object; therefore, any modification of the returned tessellation data affects the file structure object and can be used to set new tessellation data for it. */ OdPrcFileStructureTessellation &fileStructureTessellation(); /** \details Requests the current tessellation data from the file structure. \returns A constant reference to the object that contains the tessellation data from the file structure. \remarks Call this method to restrict modifications of the returned object outside the file structure object. */ const OdPrcFileStructureTessellation &fileStructureTessellation() const; /** \details Requests the current file structure tree. \returns An object. \remarks The method returns the object of the file structure via a reference; therefore, any modification of the returned object affects the file structure object and can be used to set a new . */ OdPrcFileStructureTree &fileStructureTree(); /** \details Requests the current file structure tree. \returns A constant reference to the object. \remarks Call this method if you want to restrict modifications of the returned object outside the file structure object. */ const OdPrcFileStructureTree &fileStructureTree() const; /** \details Requests the current of the file structure. \returns An object. \remarks The method returns the object of the file structure via a reference; therefore, any modification of the returned object affects the file structure object and can be used to set a new . */ OdPrcFileStructureGlobals &fileStructureGlobals(); /** \details Requests the current of the file structure. \returns A constant reference to the object. \remarks Call this method if you want to restrict modifications of the returned object outside the file structure object. */ const OdPrcFileStructureGlobals &fileStructureGlobals() const; /** \details Requests the current of the file structure. \returns An object. \remarks The method returns the object of the file structure via a reference; therefore, any modification of the returned object affects the file structure object and can be used to set a new . */ OdPrcSchema &schema(); /** \details Requests the current of the file structure. \returns A constant reference to the object. \remarks Call this method if you want to restrict modifications of the returned object outside the file structure object. */ const OdPrcSchema &schema() const; /** \details Requests the array of private from the file structure header. \returns An object. \remarks The method returns the object of the file structure via a reference; therefore, any modification of the returned object affects the file structure object and can be used to set a new . */ OdPrcUncompressedFiles &uncompressedFiles(); /** \details Requests the array of from the file structure header. \returns A constant reference to the object. \remarks Call this method if you want to restrict modifications of the returned object outside the file structure object. */ const OdPrcUncompressedFiles &uncompressedFiles() const; /** \details Requests the current unique identifier of the application. \returns An object that represents the unique identifier of the application. \remarks The unique application identifier is returned as a reference to an object; therefore, it can be used to set a new identifier. */ OdPrcUniqueId &applicationId(); /** \details Requests the current unique identifier of the application. \returns A constant reference to the object that represents the unique identifier of the application. \remarks Call this method if you want to restrict modifications of the returned object. */ const OdPrcUniqueId &applicationId() const; /** \details Returns the of the file structure. \returns An object that represents the unique identifier of the file structure. \remarks The method returns the object of the file structure via a reference; therefore, any modification of the returned object affects the file structure object and can be used to set a new . */ OdPrcUniqueId &fileStructureId(); /** \details Requests the current unique identifier of the file structure. \returns A constant reference to the object that represents the unique identifier of the file structure. \remarks Call this method if you want to restrict modifications of the returned object. */ const OdPrcUniqueId &fileStructureId() const; /** \details Sets the required PRC format versions for reading and authoring data from the file structure. \param minimal_version_for_read [in] An unsigned 32-bit integer value that represents the minimum version for reading to be set. \param authoring_version [in] An unsigned 32-bit integer value that represents the authoring version to be set. \returns The eOk value if new versions are successfully set, or an appropriate error code in the other case. */ OdResult setVersions(OdUInt32 minimal_version_for_read, OdUInt32 authoring_version); /** \details Requests the minimum version of the PRC format required for reading data from the file structure. \returns An unsigned 32-bit integer value that contains the minimum version for reading. */ OdUInt32 minimalVersionForRead() const; /** \details Requests the version of the authoring tool for working with the file structure. \returns An unsigned 32-bit integer value that contains the authoring version. */ OdUInt32 authoringVersion() const; /** \details Destroys the file structure object. */ virtual ~OdPrcFileStructure(); /** \details Adds a PRC object to the file structure. \param object [in] A pointer to the to be added to the file structure. */ void addObject (OdPrcReferencedBase *object); /** \details Adds a PRC object with a specified unique identifier to the file structure. \param object [in] A pointer to the to be added to the file structure. \param uid [in] An unsigned 32-bit integer value that contains the unique identifier of the object to be added. */ void addObject (OdPrcReferencedBase *object, OdUInt32 uid); /** \details Adds a to the file structure. \param body [in] A raw pointer to a to be added to the file structure. */ void addObject (OdPrcBody *body); /** \details Requests the for a file structure element specified with a specified handle. \param h [in] A database handle of the PRC object in the file structure. \returns The of the file structure element. */ OdPrcObjectId getObjectId (const OdDbHandle& h) const; /** \details Sets a new for the file structure. \param stub [in] A pointer to an OdDbStub object that represents the PRC object identifier. */ void setObjectId (OdDbStub* stub); /** \details Requests the of the file structure. \returns A constant reference to the instance. \remarks Since the method returns the file structure via a constant reference, it can't be modified outside the object. */ const OdPrcObjectId& objectId() const; /** \details Writes extra geometry data from the file structure to a specified . \param pStream [in] A pointer to the to write to. */ void writeExtraGeometry (OdPrcCompressedFiler *pStream); /** \details Reads extra geometry data from a specified to the file structure. \param pStream [in] A pointer to the to read from. */ void readExtraGeometry (OdPrcCompressedFiler *pStream); }; #endif // _PRCFILESTRUCTURE_INCLUDED_