CFx SDK Documentation  2020SP3
OdAuditInfo.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, 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 Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 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 _OD_AUDITINFO_INCLUDED_
28 #define _OD_AUDITINFO_INCLUDED_
29 
30 #include "TD_PackPush.h"
31 
32 #include "DbRootExport.h"
33 #include "OdString.h"
34 #include "RxObject.h"
35 
36 class OdAuditInfoImpl;
37 //class OdRxObject;
38 
48 {
49 public:
50 
51  enum PrintDest
52  {
53  kSilent = 0, // None.
54  kCmdLine = 1, // Command line.
55  kFile = 2, // File.
56  kBoth = 3 // Both command line and file.
57  };
58  struct MsgInfo
59  {
64  bool bIsError;
65  };
66 
68 
69  virtual ~OdAuditInfo();
70 
75  bool fixErrors() const;
76 
84  bool fixErrors);
85 
89  int numErrors() const;
90 
94  int numFixes() const;
95 
101  int count);
102 
108  int count);
109 
124  virtual void printError(
125  const OdString& name,
126  const OdString& value,
127  const OdString& validation = OdString::kEmpty,
128  const OdString& defaultValue = OdString::kEmpty );
129 
141  virtual void printError(
142  const OdRxObject* pObject,
143  const OdString& value,
144  const OdString& validation = OdString::kEmpty,
145  const OdString& defaultValue = OdString::kEmpty);
146 
152  virtual void printInfo (
153  const OdString& logInfo);
154 
158  void requestRegen();
159 
164 
169 
173  int numEntities();
174 
178  virtual const MsgInfo& getLastInfo();
179 
184  virtual void setLastInfo(
185  MsgInfo &lastInfo);
186 
187  /* If the current count of entities being maintained in the instance
188  of OdAuditInfo is a multiple of 100, and msg is not NULL,
189  then this function will print the string pointed to by msg
190  followed by the current entity count out to the audit log file.
191  void printNumEntities(const OdChar* msg);
192  */
193 
210  PrintDest printDest);
211 
227 
228 private:
229  OdAuditInfoImpl* m_pImpl;
230 };
231 
238 
239 #include "TD_PackPop.h"
240 
241 #endif // _OD_AUDITINFO_INCLUDED_
242 
OdAuditInfo::MsgInfo
Definition: OdAuditInfo.h:59
OdString
Definition: OdString.h:95
odrxRegisterAuditInfoDestructorCallback
DBROOT_EXPORT void odrxRegisterAuditInfoDestructorCallback(const ODAUDITINFO_CALLBACK callbackFunc)
name
GLuint const GLchar * name
Definition: gles2_ext.h:265
OdAuditInfo::OdAuditInfo
OdAuditInfo()
count
GLsizei GLsizei * count
Definition: gles2_ext.h:276
OdAuditInfo::MsgInfo::strName
OdString strName
Definition: OdAuditInfo.h:60
OdAuditInfo::numErrors
int numErrors() const
OdRxObject
Definition: RxObject.h:564
OdAuditInfo::setLastInfo
virtual void setLastInfo(MsgInfo &lastInfo)
OdAuditInfo::PrintDest
PrintDest
Definition: OdAuditInfo.h:52
OdAuditInfo::incNumEntities
void incNumEntities()
TD_PackPop.h
OdAuditInfo::errorsFixed
void errorsFixed(int count)
OdAuditInfo::~OdAuditInfo
virtual ~OdAuditInfo()
ODAUDITINFO_CALLBACK
void(* ODAUDITINFO_CALLBACK)(const OdAuditInfo *)
Definition: OdAuditInfo.h:235
RxObject.h
DbRootExport.h
OdAuditInfo::printError
virtual void printError(const OdString &name, const OdString &value, const OdString &validation=OdString::kEmpty, const OdString &defaultValue=OdString::kEmpty)
OdAuditInfo::resetNumEntities
void resetNumEntities()
OdString.h
OdAuditInfo::requestRegen
void requestRegen()
OdAuditInfo::getLastInfo
virtual const MsgInfo & getLastInfo()
OdAuditInfo::fixErrors
bool fixErrors() const
OdAuditInfo::errorsFound
void errorsFound(int count)
TD_PackPush.h
OdAuditInfo::MsgInfo::bIsError
bool bIsError
Definition: OdAuditInfo.h:64
OdAuditInfo::setPrintDest
void setPrintDest(PrintDest printDest)
OdAuditInfo::printInfo
virtual void printInfo(const OdString &logInfo)
OdAuditInfo::getPrintDest
PrintDest getPrintDest()
OdAuditInfo::printError
virtual void printError(const OdRxObject *pObject, const OdString &value, const OdString &validation=OdString::kEmpty, const OdString &defaultValue=OdString::kEmpty)
DBROOT_EXPORT
#define DBROOT_EXPORT
Definition: DbRootExport.h:39
value
GLsizei const GLfloat * value
Definition: gles2_ext.h:302
OdAuditInfo::numEntities
int numEntities()
OdString::kEmpty
FIRSTDLL_EXPORT_STATIC static const OdString kEmpty
Definition: OdString.h:98
OdAuditInfo::MsgInfo::strDefaultValue
OdString strDefaultValue
Definition: OdAuditInfo.h:63
OdAuditInfo::setFixErrors
void setFixErrors(bool fixErrors)
odrxUnregisterAuditInfoDestructorCallback
DBROOT_EXPORT void odrxUnregisterAuditInfoDestructorCallback()
OdAuditInfo::MsgInfo::strValidation
OdString strValidation
Definition: OdAuditInfo.h:62
OdAuditInfo
Definition: OdAuditInfo.h:48
void
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)
OdIfc::kBoth
@ kBoth
Definition: IfcModelerGeometry.h:79
OdAuditInfo::numFixes
int numFixes() const
OdAuditInfo::MsgInfo::strValue
OdString strValue
Definition: OdAuditInfo.h:61