CFx SDK Documentation
2022 SP0
|
#include <DbBaseHostAppServices.h>
Public Types | |
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 } |
enum | GsBitmapDeviceFlags { kUseSoftwareHLR = (1 << 0) , kFor2dExportRender = (1 << 1) , kFor2dExportRenderHLR = (1 << 2) , kForThumbnail = (1 << 3) } |
Public Member Functions | |
ODRX_DECLARE_MEMBERS (OdDbBaseHostAppServices) | |
OdDbBaseHostAppServices () | |
virtual OdString | findFile (const OdString &filename, OdDbBaseDatabase *pDb=0, FindFileHint hint=kDefault)=0 |
virtual OdDbHostAppProgressMeter * | newProgressMeter () |
virtual void | releaseProgressMeter (OdDbHostAppProgressMeter *pProgressMeter) |
virtual const OdString | program ()=0 |
virtual const OdString | product ()=0 |
virtual const OdString | companyName ()=0 |
virtual ProdIdCode | prodcode () |
virtual const OdString | releaseMajorMinorString () |
virtual int | releaseMajorVersion () |
virtual int | releaseMinorVersion () |
virtual const OdString | versionString () |
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 OdString | formatMessage (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 OdString | getAlternateFontName () const =0 |
virtual OdString | getFontMapFileName () const =0 |
virtual OdString | getPreferableFont (const OdString &fontName, OdFontType fontType)=0 |
virtual OdString | getSubstituteFont (const OdString &fontName, OdFontType fontType)=0 |
virtual OdString | getSubstituteFontByChar (const OdFont &pFont, OdChar unicodeChar, OdDbBaseDatabase *pDb) |
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) |
Public Member Functions inherited from OdRxObject | |
ODRX_HEAP_OPERATORS () | |
OdRxObject () | |
virtual | ~OdRxObject () |
virtual OdRxObject * | queryX (const OdRxClass *pClass) const |
virtual OdRxObject * | x (const OdRxClass *pClass) const |
virtual OdRxClass * | isA () 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 | |
Static Public Member Functions inherited from OdRxObject | |
static OdRxObjectPtr | cast (const OdRxObject *pointer) |
static OdRxClass * | desc () |
This class is the base class for platform specific operations within Teigha.
Corresponding C++ library: TD_Db
<group OdDb_Classes>
Definition at line 84 of file DbBaseHostAppServices.h.
Enumerator | |
---|---|
kDefault | |
kFontFile | |
kCompiledShapeFile | |
kTrueTypeFontFile | |
kEmbeddedImageFile | |
kXRefDrawing | |
kPatternFile | |
kTXApplication | |
kFontMapFile | |
kUnderlayFile | |
kTextureMapFile | |
kPhotometricWebFile |
Definition at line 98 of file DbBaseHostAppServices.h.
Enumerator | |
---|---|
kUseSoftwareHLR | |
kFor2dExportRender | |
kFor2dExportRenderHLR | |
kForThumbnail |
Definition at line 114 of file DbBaseHostAppServices.h.
Enumerator | |
---|---|
kDrawingOpen | |
kXrefResolution | |
kRasterResolution |
Definition at line 91 of file DbBaseHostAppServices.h.
OdDbBaseHostAppServices::OdDbBaseHostAppServices | ( | ) |
|
virtual |
Print the audit report for the specified AuditInfo object.
pAuditInfo | [in] Pointer to an OdDbAuditInfo object. |
strLine | [in] The string to print. |
printDest | [in] Print destination. |
Reimplemented in OdDbHostAppServices.
|
virtual |
Initialize brep builder with product specific implementation. Return eNotImplementedYet by default.
brepBuilder | [in] instance of brep builder class. |
bbType | [in] type of brep. |
Reimplemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
virtual |
Collects TrueType font paths.
res | [out] Array of full file names of TrueType fonts. |
sPath | [in] Array of folders paths with TrueType files. |
sFilter | [in] File name filter. |
Reimplemented in OdDbHostAppServices.
|
pure virtual |
Returns the name of the client company.
Implemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
virtual |
Prompts the user for a filename, and returns their response.
flags | [in] Dialog behavior. |
dialogCaption | [in] Dialog caption. |
defExt | [in] Default file extension without "." |
defFilename | [in] Default filename. |
filter | [in] Filter pattern. |
Value Description kGfpForOpen 0 For Open. kGfpForSave 1 For Save. kGfpOverwritePrompt 2 Enable overwrite prompt displaying when exist file selected for saving.
This function is intended for the selection of filenames via dialog boxes, although other methods may be used.
Returns "canceled" if the user cancels the request. Returns "unsupported" if the application does not support this user input.
Reimplemented in OdDbHostAppServices.
|
pure virtual |
Returns the fully qualified path to the specified file.
filename | [in] Name of the file to find. |
pDb | [in] Pointer to the database context. |
hint | [in] Hint that indicates the type of file that is required. |
This function is called by Teigha when access is needed to a file, such as a font file, a template file, etc.
pDb == 0 specifies that this file search is not related to a database.
If pDb != 0, call pDb->getFilename() to determine the path to the DWG file associated with the database.
The typical search order is as follows:
hint must be one of the following:
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 Drawing template file. DWT kPatternFile 6 Pattern file (PAT) PAT kTXApplication 7 Teigha(R) Xtension file. TX kFontMapFile 8 FontMap file FMP kUnderlayFile 9 Underlay file kTextureMapFile 10
Implemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
virtual |
Returns a formatted message corresponding to the specified error code(s).
errorCode | [in] Error code. |
Reimplemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
pure virtual |
Returns the font file to be used when a given font file is not found by Teigha.
Implemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
virtual |
Returns the error description associated with the specified error code.
errorCode | [in] Error code. |
Reimplemented in OdDbHostAppServices.
|
pure virtual |
Returns the name of the font mapping file used by the getPreferableFont function.
Implemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
virtual |
MtMode controls if multi-threading is used (bit-coded)
|
pure virtual |
Returns the preferable font name for the specified font name and type.
fontName | [in] Font name. |
fontType | [in] Font type. |
fontType must be one of the following:
Value Description kFontTypeUnknown 0 Unknown. kFontTypeShx 1 SHX font. kFontTypeTrueType 2 TrueType font. kFontTypeShape 3 Shape file. kFontTypeBig 4 BigFont file.
Implemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
pure virtual |
Returns the font to be used when the specified font is not found.
fontName | [in] Font name. |
fontType | [in] Font type. |
Value Description kFontTypeUnknown 0 Unknown. kFontTypeShx 1 SHX font. kFontTypeTrueType 2 TrueType font. kFontTypeShape 3 Shape file. kFontTypeBig 4 BigFont file.
The default implementation of this function calls getAlternateFontName for fonts that are not of type kFontTypeShape or kFontTypeBig. When they are, and empty string is returned.
Client code could override this function to perform custom substitution for these types of fonts.
Implemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
inlinevirtual |
Returns the typeface name of the TTF font which has the character.
pFont | [in] Current font. |
unicodeChar | [in] Current symbol. |
pDb | [in] Pointer to the database context. |
Reimplemented in OdDbHostAppServices, and OdIfcHostAppServices.
Definition at line 496 of file DbBaseHostAppServices.h.
|
virtual |
Collects folders with TrueType fonts.
aDirs | [out] Array names of folders. |
Reimplemented in OdDbHostAppServices.
|
virtual |
Returns the path to the temporary files folder.
Reimplemented in OdDbHostAppServices.
|
virtual |
Returns a the gsBitmapDevice associated with this HostAppServices object.
pViewObj | [in] OdAbstractViewPE compatible object (OdGsView, OdDbViewport or etc.). |
pDb | [in] Pointer to the database context. |
flags | [in] Bitmap device flags. |
Reimplemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
virtual |
Returns an instance of an OdDbHostAppProgressMeter.
Reimplemented in OdDbHostAppServices.
|
virtual |
Returns an alternate UndoController object for Teigha.
Each database requires at most 2 undo controllers (for undo and redo).
Reimplemented in OdDbHostAppServices.
|
virtual |
Returns an alternate stream object for undo/redo operations.
|
virtual |
Returns the number of threads for required multi-threaded mode.
OdDbBaseHostAppServices::ODRX_DECLARE_MEMBERS | ( | OdDbBaseHostAppServices | ) |
|
virtual |
Returns the name of the client product code.
prodcode() returns one of the following:
Value Description kProd_ACAD 1 Plain kProd_LT 2 Lite kProd_OEM 3 OEM kProd_OdDb 4 ..
Reimplemented in OdDbHostAppServices.
|
pure virtual |
Returns the name of the client product.
Implemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
pure virtual |
Returns the name of the client program.
Implemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
virtual |
Returns the release major and minor version string of the client application.
Reimplemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
virtual |
Returns the release major version of the client application.
Reimplemented in OdDbHostAppServices.
|
virtual |
Returns the release minor version of the client application.
Reimplemented in OdDbHostAppServices.
|
virtual |
Notification function called whenever Teigha no longer needs the specified ProgressMeter object.
pProgressMeter | [in] Pointer to the ProgressMeter object no longer needed by Teigha. |
Reimplemented in OdDbHostAppServices.
|
virtual |
Locates the TTF or TTC file containing the specified font description.
description | [in] Font description. |
filename | [out] Receives the name of the TrueType font file. |
|
virtual |
Returns the release version string of the client application.
Reimplemented in OdDbHostAppServices, and OdIfcHostAppServices.
|
virtual |
Displays the specified warning message.
warnVisGroup | [in] Group of warning message visibility (always visible if empty). |
message | [in] Warning message. |
|
virtual |
Displays the specified warning message.
warnVisGroup | [in] Group of warning message visibility (always visible if empty). |
warningOb | [in] Warning object. |
Displays the specified warning message.
message | [in] Warning message. |
Displays the specified warning message.
warningOb | [in] Warning object. |