/////////////////////////////////////////////////////////////////////////////// // 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 __TNW_DB_EXTERNAL_GEOMETRY_PE_H__ #define __TNW_DB_EXTERNAL_GEOMETRY_PE_H__ #include "RxObject.h" #include "NwExport.h" #define STL_USING_MAP #include "OdaSTL.h" class OdRxRcsFileServices; /** \details This template class is a specialization of the OdSharedPtr class for OdRxRcsFileServices object pointers. */ typedef OdSmartPtr OdRxRcsFileServicesPtr; /** \details This class represents database-specific external geometry protocol extension. */ class NWDBEXPORT OdNwAbstractDBExternalGeometryPE : public OdRxObject { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwAbstractDBExternalGeometryPE); //DOM-IGNORE-END public: /** \details Default constructor. Creates a new OdNwAbstractDBExternalGeometryPE object. */ OdNwAbstractDBExternalGeometryPE() = default; /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwAbstractDBExternalGeometryPE() = default; /** \details Setter for the find reference callback that is needed for lazy initialization of stream map. \param findPointCloudClbk [in] Function with two inner parameters where the first one is inner key-path. In successful case it will change the inner path or initialize stream buffer pointer with embedded file. \returns eOk if the method executes successfully, and eNullObjectPointer code if something went wrong. */ virtual OdResult setFindReferenceCallback(const OdRxObject* pThis, std::function findReferenceCallback) = 0; /** \details Returns embedded stream buffer for the specified reference name. \param refName [in] Name of the reference. \param findReferenceCallback [in] Function callback for finding references. \param create [in] Flag indicating whether to create the stream if not found. \returns Smart pointer to the stream buffer if successful, or null pointer otherwise. */ virtual OdStreamBufPtr getEmbeddedStreamBuffer(const OdRxObject* pThis, const OdString& refName, const std::function& findReferenceCallback, bool create) = 0; /** \details Delete refernces to all stored file names. */ virtual void resetCache(const OdRxObject* pThis) = 0; }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwAbstractDBExternalGeometryPE object pointers. */ typedef OdSmartPtr OdNwAbstractDBExternalGeometryPEPtr; #endif //__TNW_DB_EXTERNAL_GEOMETRY_PE_H__