CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbBaseHostAppServices.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24
25
26
27#ifndef _ODDB_BASEHOSTAPPSERVICES_INCLUDED_
28#define _ODDB_BASEHOSTAPPSERVICES_INCLUDED_
29
30
31#include "TD_PackPush.h"
32
33
34#include "DbRootExport.h"
35#include "DbBaseDatabase.h"
37#include "RxObject.h"
38#include "SmartPtr.h"
39#include "OdFont.h"
41
42class OdGsDevice;
47
53
54class OdAuditInfo;
55class OdTtfDescriptor;
56
57
58typedef unsigned long LCID;
59
61{
66};
67
69{
70 kProd_ACAD = 1, // Plain
71 kProd_LT = 2, // Lite
72 kProd_OEM = 3, // OEM
73 kProd_OdDb = 4 // ..
74};
75
76
85{
86public:
88
90
92 {
93 kDrawingOpen = 0,
94 kXrefResolution = 1,
95 kRasterResolution = 2
96 };
97
99 {
100 kDefault = 0, // Any file.
101 kFontFile = 1, // Can be either SHX or TTF file.
102 kCompiledShapeFile = 2, // SHX file.
103 kTrueTypeFontFile = 3, // TTF file.
104 kEmbeddedImageFile = 4, // Image file (ISM).
105 kXRefDrawing = 5, // Drawing template file (DWT).
106 kPatternFile = 6, // Pattern file (PAT).
107 kTXApplication = 7, // ODA Xtension file (TX).
108 kFontMapFile = 8, // FontMap file (FMP).
109 kUnderlayFile = 9, // Underlay file.
110 kTextureMapFile = 10, // Material texture file.
111 kPhotometricWebFile = 11, // Photometric web file (IES).
112 kAssetLibXMLFile = 12 // ADSK asset library file (XML).
113 };
114
116 {
117 kUseSoftwareHLR = (1 << 0), // Enable use of SoftwareHLR on device
118 kFor2dExportRender = (1 << 1), // Device for shaded viewport export
119 kFor2dExportRenderHLR = (1 << 2), // Device for HiddenLine viewport export
120 kForThumbnail = (1 << 3) // Device for thumbnail image generation
121 };
122
171 const OdString& filename,
172 OdDbBaseDatabase* pDb = 0,
173 FindFileHint hint = kDefault) = 0;
174
179
189 OdDbHostAppProgressMeter* pProgressMeter);
190
200 virtual const OdString program() = 0;
201
211 virtual const OdString product() = 0;
212
222 virtual const OdString companyName() = 0;
223
244
252
259 virtual int releaseMajorVersion();
260
267 virtual int releaseMinorVersion();
268
275 virtual const OdString versionString();
276
285 virtual void warning(
286 const OdString& message);
287
297 virtual void warning(
298 const char* warnVisGroup,
299 const OdString& message);
300
306 virtual void warning(
307 OdWarning warningOb);
308
315 virtual void warning(
316 const char* warnVisGroup,
317 OdWarning warningOb);
318
319 //virtual void warning(
320 // OdWarning warningOb,
321 // OdDbObjectId objectId);
322
331 unsigned int errorCode);
332
338 unsigned int errorCode,...);
339#ifdef ODA_FORMAT
344 virtual OdString formatMessage(unsigned int errorCode, long i, const OdString& str) { return formatMessage(errorCode, i, (void*)str.c_str()); }
345#endif
346
356
367
378 virtual void auditPrintReport(
379 OdAuditInfo* pAuditInfo,
380 const OdString& strLine,
381 int printDest) const;
382
396 const OdTtfDescriptor& description,
397 OdString& filename);
398
406 virtual OdString getAlternateFontName() const = 0;
407
418 virtual OdString getFontMapFileName() const = 0;
419
448 const OdString& fontName,
449 OdFontType fontType) = 0;
450
480 const OdString& fontName,
481 OdFontType fontType) = 0;
482
497 const OdFont& pFont,
498 OdChar unicodeChar, OdDbBaseDatabase *pDb) { return OdString::kEmpty; }
499
509 OdStringArray& aDirs);
510
522 const OdString& sPath, // in
523 const OdString& sFilter = L"*.*");
524
554 int flags,
555 const OdString& dialogCaption = OdString::kEmpty,
556 const OdString& defExt = OdString::kEmpty,
557 const OdString& defFilename = OdString::kEmpty,
558 const OdString& filter = OdString::kEmpty);
559
568 OdRxObject* pViewObj = NULL,
569 OdDbBaseDatabase* pDb = NULL,
570 OdUInt32 flags = 0);
571
575 virtual OdString getTempPath() const;
576
577// ODA_MT_DBIO_BEGIN
588 virtual OdInt16 getMtMode() const;
589
594// ODA_MT_DBIO_END
595
603 virtual OdResult brepBuilder(OdBrepBuilder& bbuilder, BrepType bbType);
604
609 virtual OdResult getEnv(const OdString &varName, OdString &value);
610
614 virtual OdResult setEnv(const OdString &varName, const OdString &newValue);
615
620};
621
623
624
625#include "TD_PackPop.h"
626
627#endif // _ODDB_BASEHOSTAPPSERVICES_INCLUDED_
@ kDefault
Definition: BrEnums.h:132
BrepType
Definition: BrepBuilder.h:43
OdSmartPtr< OdGsDevice > OdGsDevicePtr
unsigned long LCID
OdSmartPtr< OdDbBaseHostAppServices > OdDbBaseHostAppServicesPtr
OdSmartPtr< OdDbUndoController > OdDbUndoControllerPtr
@ kProd_ACAD
@ kProd_OdDb
@ kSDIAppEnforced
@ kSDIUserAndAppEnforced
@ kMDIEnabled
@ kSDIUserEnforced
#define DBROOT_EXPORT
Definition: DbRootExport.h:39
OdFontType
Definition: OdFont.h:52
unsigned int OdUInt32
short OdInt16
#define ODRX_ABSTRACT
wchar_t OdChar
OdResult
Definition: OdResult.h:29
virtual ProdIdCode prodcode()
virtual OdString getPreferableFont(const OdString &fontName, OdFontType fontType)=0
virtual OdGsDevicePtr gsBitmapDevice(OdRxObject *pViewObj=NULL, OdDbBaseDatabase *pDb=NULL, OdUInt32 flags=0)
virtual void warning(const char *warnVisGroup, const OdString &message)
virtual void warning(const OdString &message)
virtual OdString findFile(const OdString &filename, OdDbBaseDatabase *pDb=0, FindFileHint hint=kDefault)=0
virtual OdDbHostAppProgressMeter * newProgressMeter()
virtual void warning(OdWarning warningOb)
virtual int numThreads(OdDb::MultiThreadedMode mtMode)
virtual const OdString releaseMajorMinorString()
virtual OdInt16 getMtMode() const
virtual bool getSystemFontFolders(OdStringArray &aDirs)
virtual const OdString companyName()=0
virtual OdResult setEnv(const OdString &varName, const OdString &newValue)
virtual const OdString versionString()
virtual const OdString program()=0
virtual OdString getSubstituteFontByChar(const OdFont &pFont, OdChar unicodeChar, OdDbBaseDatabase *pDb)
virtual int releaseMajorVersion()
virtual void warning(const char *warnVisGroup, OdWarning warningOb)
virtual OdDbUndoControllerPtr newUndoController()
virtual const OdString product()=0
virtual bool ttfFileNameByDescriptor(const OdTtfDescriptor &description, OdString &filename)
virtual void releaseProgressMeter(OdDbHostAppProgressMeter *pProgressMeter)
virtual OdString getTempPath() const
virtual OdResult getEnv(const OdString &varName, OdString &value)
virtual OdString getSubstituteFont(const OdString &fontName, OdFontType fontType)=0
virtual OdStreamBufPtr newUndoStream()
virtual void collectFilePathsInDirectory(OdStringArray &res, const OdString &sPath, const OdString &sFilter=L"*.*")
virtual OdString getAppUserName(Oda::UserNameFormat unFormat=Oda::kUserId)
ODRX_DECLARE_MEMBERS(OdDbBaseHostAppServices)
virtual int releaseMinorVersion()
virtual void auditPrintReport(OdAuditInfo *pAuditInfo, const OdString &strLine, int printDest) const
virtual OdString getErrorDescription(unsigned int errorCode)
virtual OdResult brepBuilder(OdBrepBuilder &bbuilder, BrepType bbType)
virtual OdString getAlternateFontName() const =0
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 OdString formatMessage(unsigned int errorCode,...)
virtual OdString getFontMapFileName() const =0
Definition: OdFont.h:371
const OdChar * c_str() const
Definition: OdString.h:203
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
Definition: OdString.h:98
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
MultiThreadedMode
Definition: OdaDefs.h:426