/////////////////////////////////////////////////////////////////////////////// // 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 _DAI_HOST_APP_SERVICES_BASE_H #define _DAI_HOST_APP_SERVICES_BASE_H #include "OdaCommon.h" #include "DbBaseHostAppServices.h" #include "daiBuildOptions.h" #include "TD_PackPush.h" #define STL_USING_MAP #include "OdaSTL.h" #define MAXIMUM_MEMORY_FILE_BUFFER_SIZE 10485760 /** \details Implements the Data Access Interface (DAI) that provides functionality for manipulating data that is defined within the EXPRESS SCHEMA format. */ namespace OdDAI { class OdHeaderSection; typedef OdSmartPtr OdHeaderSectionPtr; } using OdDAISpecSymbolDictionary = std::map; /** \details A class that implements platform specific operations within the Data Access Interface functionality. */ class ODRX_ABSTRACT DAI_EXPORT OdDAIHostAppServicesBase : public OdDbBaseHostAppServices { public: //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdDAIHostAppServicesBase); //DOM-IGNORE-END /** \details Creates a new repository object with default parameters. */ OdDAIHostAppServicesBase(); /** \details Retrieves the Data Access Interface database class description. \returns The desc() method's result of the OdIfcFile object. */ virtual OdRxClass* databaseClass() const = 0; /** \details Retrieves the STEP database class description. \param schemaName [in] A string that contains schema name for wich needs database class description. \returns Returns the desc() method's result of the object. */ virtual OdRxClass* databaseClass(const OdAnsiString& schemaName) const = 0; /** \details Retrieves the Data Access Interface model class description. \returns The desc() method's result of the object. */ virtual OdRxClass* modelClass() const; /** \details Searches for a specified file and returns its full path. \param fileName [in] A string that contains the name of the file. \param pDb [in] A raw pointer to the database context. \param hint [in] A hint that indicates the type of file that is required. \returns A string that contains the full path of the file, or an empty string if the file is not found. \sa OdDbBaseHostAppServices::findFile Method */ virtual OdString findFile(const OdString& fileName, OdDbBaseDatabase* pDb = nullptr, FindFileHint hint = kDefault); /** \details Returns the name of the file that contains an EXPRESS schema definition associated with a specified schema identifier. \param schemaIdentifier [in] An ANSI string that contains the schema identifier \returns An OdAnsiString object that contains the name of the file that contains the EXPRESS schema definition. \remarks Default implementation contains mapping for following supported schemas:
Identifier Protocol
CONFIG_CONTROL_DESIGN AP203
AP203_CONFIGURATION_CONTROLLED_3D_DESIGN_OF_MECHANICAL_PARTS_AND_ASSEMBLIES_MIM_LFap203ed2_mim_lf.exp
AUTOMOTIVE_DESIGN AP214
INTEGRATED_CNC_SCHEMA AP238
AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF AP242
AP209_MULTIDISCIPLINARY_ANALYSIS_AND_DESIGN_MIM_LF AP209
STRUCTURAL_FRAME_SCHEMA CIS/2
*/ virtual const OdAnsiString& findSchemaFileName(const OdAnsiString &schemaIdentifier) const; /** \details Retrieves the header section of the specified IFC file. \param filename [in] A string that contains the full path to the input IFC file. \returns A smart pointer to the object that contains the header section data. */ OdDAI::OdHeaderSectionPtr getHeaderSection(const OdString& filename); /** \details Sets a new maximum unzip memory buffer size. \param maxMemoryBufferSize [in] A maximum memory buffer size to be assigned. */ void setMaxMemoryBufferSize(OdUInt64 maxMemoryBufferSize); /** \details Retrieves the maximum unzip memory buffer size. \returns A maximum memory buffer size. */ const OdUInt64 getMaxMemoryBufferSize() const; /** \details Sets a symbols dictionary for a font family name. \param fontName [in] A font family name. \param symbolDictionary [in] A symbols dictionary. */ virtual void setFontSpecSymbolMapping(const OdString& fontName, const OdDAISpecSymbolDictionary& symbolDictionary); /** \details Retrieves the symbols dictionary for a font family name. \param ntName [in] A font family name. \returns A symbols dictionary. If font is not registered returns default dictionary. */ virtual const OdDAISpecSymbolDictionary& getFontSpecSymbolMapping(const OdString& fontName); /** \details Sets an associated file name or registered name for using font family name. \param pseudoName [in] A using font family name. \param realName [in] A associated file name or registered name. */ virtual void setCustomSubstituteFont(const OdString& pseudoName, const OdString& realName); //DOM-IGNORE-BEGIN protected: OdUInt64 m_maxMemoryBufferSize; //DOM-IGNORE-END }; #include "TD_PackPop.h" #endif // _DAI_HOST_APP_SERVICES_BASE_H