CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdMvdXmlHostAppServices Class Reference

#include <MvdXmlHostAppServices.h>

Inheritance diagram for OdMvdXmlHostAppServices:
OdDbBaseHostAppServices OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdMvdXmlHostAppServices)
 
 OdMvdXmlHostAppServices ()
 
 ~OdMvdXmlHostAppServices ()
 
OdMvdXml::OdMvdXmlProcessorPtr getProcessor (OdMvdXml::ProccesorType type)
 
virtual OdRxClassdatabaseClass () const
 
virtual OdString findFile (const OdString &filename, OdDbBaseDatabase *pDb=0, FindFileHint hint=kDefault)
 
virtual const OdString program ()
 
virtual const OdString product ()
 
virtual const OdString companyName ()
 
virtual const OdString releaseMajorMinorString ()
 
virtual const OdString versionString ()
 
virtual OdString formatMessage (unsigned int errorCode,...)
 
virtual OdString getAlternateFontName () const
 
virtual OdString getFontMapFileName () const
 
virtual OdString getPreferableFont (const OdString &fontName, OdFontType fontType)
 
virtual OdString getSubstituteFont (const OdString &fontName, OdFontType fontType)
 
virtual OdString getSubstituteFontByChar (const OdFont &pFont, OdChar unicodeChar, OdDbBaseDatabase *pDb)
 
- Public Member Functions inherited from OdDbBaseHostAppServices
 ODRX_DECLARE_MEMBERS (OdDbBaseHostAppServices)
 
 OdDbBaseHostAppServices ()
 
virtual OdDbHostAppProgressMeternewProgressMeter ()
 
virtual void releaseProgressMeter (OdDbHostAppProgressMeter *pProgressMeter)
 
virtual ProdIdCode prodcode ()
 
virtual int releaseMajorVersion ()
 
virtual int releaseMinorVersion ()
 
virtual void warning (const OdString &message)
 
virtual void warning (const char *warnVisGroup, const OdString &message)
 
virtual void warning (OdWarning warningOb)
 
virtual void warning (const char *warnVisGroup, OdWarning warningOb)
 
virtual OdString getErrorDescription (unsigned int errorCode)
 
virtual OdDbUndoControllerPtr newUndoController ()
 
virtual OdStreamBufPtr newUndoStream ()
 
virtual void auditPrintReport (OdAuditInfo *pAuditInfo, const OdString &strLine, int printDest) const
 
virtual bool ttfFileNameByDescriptor (const OdTtfDescriptor &description, OdString &filename)
 
virtual bool getSystemFontFolders (OdStringArray &aDirs)
 
virtual void collectFilePathsInDirectory (OdStringArray &res, const OdString &sPath, const OdString &sFilter=L"*.*")
 
virtual OdString fileDialog (int flags, const OdString &dialogCaption=OdString::kEmpty, const OdString &defExt=OdString::kEmpty, const OdString &defFilename=OdString::kEmpty, const OdString &filter=OdString::kEmpty)
 
virtual OdGsDevicePtr gsBitmapDevice (OdRxObject *pViewObj=NULL, OdDbBaseDatabase *pDb=NULL, OdUInt32 flags=0)
 
virtual OdString getTempPath () const
 
virtual OdInt16 getMtMode () const
 
virtual int numThreads (OdDb::MultiThreadedMode mtMode)
 
virtual OdResult brepBuilder (OdBrepBuilder &bbuilder, BrepType bbType)
 
virtual OdResult getEnv (const OdString &varName, OdString &value)
 
virtual OdResult setEnv (const OdString &varName, const OdString &newValue)
 
virtual OdString getAppUserName (Oda::UserNameFormat unFormat=Oda::kUserId)
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Public Types inherited from OdDbBaseHostAppServices
enum  RemapFileContext { kDrawingOpen = 0 , kXrefResolution = 1 , kRasterResolution = 2 }
 
enum  FindFileHint {
  kDefault = 0 , kFontFile = 1 , kCompiledShapeFile = 2 , kTrueTypeFontFile = 3 ,
  kEmbeddedImageFile = 4 , kXRefDrawing = 5 , kPatternFile = 6 , kTXApplication = 7 ,
  kFontMapFile = 8 , kUnderlayFile = 9 , kTextureMapFile = 10 , kPhotometricWebFile = 11 ,
  kAssetLibXMLFile = 12 , kTemplateFile = 13 , kSchemaFile = 14
}
 
enum  GsBitmapDeviceFlags { kUseSoftwareHLR = (1 << 0) , kFor2dExportRender = (1 << 1) , kFor2dExportRenderHLR = (1 << 2) , kForThumbnail = (1 << 3) }
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
static void rxInit ()
 
static void rxUninit ()
 

Detailed Description

The class implements platform-specific operations for the functionality of work with model view definitions in XML format (mvdXML module).

Definition at line 40 of file MvdXmlHostAppServices.h.

Constructor & Destructor Documentation

◆ OdMvdXmlHostAppServices()

OdMvdXmlHostAppServices::OdMvdXmlHostAppServices ( )

Creates a platform-specific operation services object for the mvdXML module with default parameters.

◆ ~OdMvdXmlHostAppServices()

OdMvdXmlHostAppServices::~OdMvdXmlHostAppServices ( )

Deletes a platform-specific operation services object for the mvdXML module.

Member Function Documentation

◆ companyName()

virtual const OdString OdMvdXmlHostAppServices::companyName ( )
virtual

Retrieves the current name of the client company.

Returns
A <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdString.html">string</exref> object containing the current name of the client company.
Remarks
The default implementation of this method returns oddgGetLibraryInfo()->getCompanyName(). This method is typically used for populating information about the client's company.

Implements OdDbBaseHostAppServices.

◆ databaseClass()

virtual OdRxClass * OdMvdXmlHostAppServices::databaseClass ( ) const
virtual

Retrieves the mvdXML database class description.

Returns
A pointer to the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdRxClass.html">OdRxClass</exref> data type that represents the database class.

◆ findFile()

virtual OdString OdMvdXmlHostAppServices::findFile ( const OdString & filename,
OdDbBaseDatabase * pDb = 0,
FindFileHint hint = kDefault )
virtual

Searches for a specified file.

Parameters
filename[in] A name of the file to find.
pDb[in] A pointer to the database context. If the parameter value is equal to NULL, the file search is not related to a database.
hint[in] A hint that indicates the type of file that is required.
Returns
A <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdString.html">string</exref> that contains the full path to the found file; if the file was not found, the method returns an empty string.
Remarks
This method is called by IFC SDK when it needs to get access to a file, such as a font file, a template file, etc. If the pointer to the database context is not equal to NULL, it is possible to call the <exref target="https://docs.opendesign.com/td_api_cpp/OdDbDatabase__getFilename@const.html">getFilename()</exref> method of the database instance to determine the full path to the IFC file associated with the database. The typical search order is the following:

The file name itself.

The current directory.

The drawing directory (for SHX font, image, and xref files).

The Windows fonts directory (only for TTF fonts on Windows platforms).

The hint parameter's value must be one of the following:

Name Value Description Extension
kDefault 0 Any file. any
kFontFile 1 Can be either SHX or TTF file. SHX or TTF
kCompiledShapeFile 2 SHX file. SHX
kTrueTypeFontFile 3 TTF file. TTF
kEmbeddedImageFile 4 Image file. ISM
kXRefDrawing 5 External reference file.
kPatternFile 6 Pattern file (PAT). PAT
kDRXApplication 7 DRX application file. DRX
kFontMapFile 8 FontMap file. FMP

Implements OdDbBaseHostAppServices.

◆ formatMessage()

virtual OdString OdMvdXmlHostAppServices::formatMessage ( unsigned int errorCode,
... )
virtual

Formats an error message string corresponding to the specified error code(s).

Parameters
errorCode[in] An error code.
Returns
A <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdString.html">string</exref> with a formatted error message.

Reimplemented from OdDbBaseHostAppServices.

◆ getAlternateFontName()

virtual OdString OdMvdXmlHostAppServices::getAlternateFontName ( ) const
virtual

Retrieves the current default font name.

Returns
A <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdString.html">string</exref> that contains the path to the font file to be used when a given font file can not be found by IFC SDK.
Remarks
The default implementation of the method returns an empty string.
See also
<exref target="https://docs.opendesign.com/td/FontHandling.html">Font Handling</exref>

Implements OdDbBaseHostAppServices.

◆ getFontMapFileName()

virtual OdString OdMvdXmlHostAppServices::getFontMapFileName ( ) const
virtual

Retrieves the current font mapping file. This font mapping file is used by the <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdIfcHostAppServices__getPreferableFont@const_OdString&@OdFontType.html">getPreferableFont()</exref> method.

Returns
A <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdString.html">string</exref> that contains the name of the font mapping file.
Remarks
The default implementation of this method returns an empty string.
See also
<exref target="https://docs.opendesign.com/td/FontHandling.html">Font Handling</exref>

Implements OdDbBaseHostAppServices.

◆ getPreferableFont()

virtual OdString OdMvdXmlHostAppServices::getPreferableFont ( const OdString & fontName,
OdFontType fontType )
virtual

Retrieves the current preferable font name for a specified font name and type.

Parameters
fontName[in] A font name.
fontType[in] A font type.
Returns
A <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdString.html">string</exref> object containing the preferable font name.
Remarks
The default implementation of this method returns an empty string.

The fontType parameter value must be one of the following:

Name Value Description
kFontTypeUnknown 0 Unknown.
kFontTypeShx 1 SHX font.
kFontTypeTrueType 2 TrueType font.
kFontTypeShape 3 Shape file.
kFontTypeBig 4 BigFont file.
See also
<exref target="https://docs.opendesign.com/td/FontHandling.html">Font Handling</exref>

Implements OdDbBaseHostAppServices.

◆ getProcessor()

OdMvdXml::OdMvdXmlProcessorPtr OdMvdXmlHostAppServices::getProcessor ( OdMvdXml::ProccesorType type)

Retrieves the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdMvdXml__OdMvdXmlProcessor.html>OdMvdXmlProcessor</exref> mvdXML processor> object. @param type [in] A <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdMvdXml__ProccesorType.html>ProccesorType</exref> type> of the requested mvdXML processor.

Returns
A smart pointer to the <<exref target="https://docs.opendesign.com/tifc_api_cpp/OdMvdXml__OdMvdXmlProcessor.html>OdMvdXmlProcessor</exref> OdMvdXmlProcessor> object.

◆ getSubstituteFont()

virtual OdString OdMvdXmlHostAppServices::getSubstituteFont ( const OdString & fontName,
OdFontType fontType )
virtual

Retrieves the current substitute font name. The substitute font is used in cases when a specified font is not found.

Parameters
fontName[in] A font name.
fontType[in] A font type.
Returns
A <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdString.html">string</exref> object that contains the substitute font name.
Remarks
The default implementation of this method returns an empty string. The fontType parameter value must be one of the following:
Name Value Description
kFontTypeUnknown 0 Unknown.
kFontTypeShx 1 SHX font.
kFontTypeTrueType 2 TrueType font.
kFontTypeShape 3 Shape file.
kFontTypeBig 4 BigFont file.
See also
<exref target="https://docs.opendesign.com/td/FontHandling.html">Font Handling</exref>

Implements OdDbBaseHostAppServices.

◆ getSubstituteFontByChar()

virtual OdString OdMvdXmlHostAppServices::getSubstituteFontByChar ( const OdFont & pFont,
OdChar unicodeChar,
OdDbBaseDatabase * pDb )
virtual

Retrieves the typeface name of the TTF font that has the specified character.

Parameters
pFont[in] A TTF font object.
unicodeChar[in] A symbol to find in the substitute font name.
pDb[in] A raw pointer to the database context.
Returns
A <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdString.html">string</exref> object that contains the substitute font name.
Remarks
The default method implementation uses the Windows API for getting the font.
See also
<exref target="https://docs.opendesign.com/td/FontHandling.html">Font Handling</exref>

Reimplemented from OdDbBaseHostAppServices.

◆ ODRX_DECLARE_MEMBERS()

OdMvdXmlHostAppServices::ODRX_DECLARE_MEMBERS ( OdMvdXmlHostAppServices )

◆ product()

virtual const OdString OdMvdXmlHostAppServices::product ( )
virtual

Retrieves the current name of the client product based on ODA IFC SDK.

Returns
A <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdString.html">string</exref> object containing the current name of the client product.
Remarks
The default implementation of this method returns program(). This method is typically used for populating information about the product.

Implements OdDbBaseHostAppServices.

◆ program()

virtual const OdString OdMvdXmlHostAppServices::program ( )
virtual

Retrieves the current name of the client program based on ODA IFC SDK.

Returns
A <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdString.html">string</exref> object containing the custom application name.
Remarks
The default implementation of this method returns oddgGetLibraryInfo()->getLibName(). This method is typically used for populating information about the application.

Implements OdDbBaseHostAppServices.

◆ releaseMajorMinorString()

virtual const OdString OdMvdXmlHostAppServices::releaseMajorMinorString ( )
virtual

Retrieves the major and minor numbers of the client application's version represented as a string.

Returns
A <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdString.html">string</exref> object that contains the application's major and minor version numbers.
Remarks
The default implementation of this method returns oddgGetLibraryInfo()->getLibVersion().

Reimplemented from OdDbBaseHostAppServices.

◆ versionString()

virtual const OdString OdMvdXmlHostAppServices::versionString ( )
virtual

Retrieves the release version of the client application represented as a string.

Returns
A <exref target="https://docs.opendesign.com/tkernel_api_cpp/OdString.html">string</exref> object that contains the release version of the client application.
Remarks
The default implementation of this method returns oddgGetLibraryInfo()->getLibVersion().

Reimplemented from OdDbBaseHostAppServices.


The documentation for this class was generated from the following file: