CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
OdAuditInfo Class Reference

#include <OdAuditInfo.h>

Inheritance diagram for OdAuditInfo:
OdDbAuditInfo

Classes

struct  MsgInfo
 

Public Types

enum  PrintDest { kSilent = 0 , kCmdLine = 1 , kFile = 2 , kBoth = 3 }
 

Public Member Functions

 OdAuditInfo ()
 
virtual ~OdAuditInfo ()
 
bool fixErrors () const
 
void setFixErrors (bool fixErrors)
 
int numErrors () const
 
int numFixes () const
 
void errorsFound (int count)
 
void errorsFixed (int count)
 
void errorsSkip (int count)
 
virtual void printError (const OdString &name, const OdString &value, const OdString &validation=OdString::kEmpty, const OdString &defaultValue=OdString::kEmpty)
 
virtual void printError (const OdRxObject *pObject, const OdString &value, const OdString &validation=OdString::kEmpty, const OdString &defaultValue=OdString::kEmpty)
 
virtual void printInfo (const OdString &logInfo)
 
void requestRegen ()
 
void resetNumEntities ()
 
void incNumEntities ()
 
int numEntities ()
 
virtual const MsgInfogetLastInfo ()
 
virtual void setLastInfo (MsgInfo &lastInfo)
 
void setPrintDest (PrintDest printDest)
 
PrintDest getPrintDest ()
 

Detailed Description

This class tracks audit information during a database audit.

See also
TD_Db

<group OdDb_Classes>

Definition at line 47 of file OdAuditInfo.h.

Member Enumeration Documentation

◆ PrintDest

Enumerator
kSilent 
kCmdLine 
kFile 
kBoth 

Definition at line 51 of file OdAuditInfo.h.

Constructor & Destructor Documentation

◆ OdAuditInfo()

OdAuditInfo::OdAuditInfo ( )

◆ ~OdAuditInfo()

virtual OdAuditInfo::~OdAuditInfo ( )
virtual

Member Function Documentation

◆ errorsFixed()

void OdAuditInfo::errorsFixed ( int  count)

Increments the count of errors reported as fixed to this AuditInfo object.

Parameters
increment[in] Increment.

◆ errorsFound()

void OdAuditInfo::errorsFound ( int  count)

Increments the count of errors reported to this AuditInfo object.

Parameters
increment[in] Increment.

◆ errorsSkip()

void OdAuditInfo::errorsSkip ( int  count)

Increments the count of errors which should be interpreted as skipped.

Parameters
increment[in] Increment.

◆ fixErrors()

bool OdAuditInfo::fixErrors ( ) const

Returns true if and only if errors are to be fixed during the audit that uses this AuditInfo object.

◆ getLastInfo()

virtual const MsgInfo & OdAuditInfo::getLastInfo ( )
virtual

Returns the last error information that is intended for printing.

◆ getPrintDest()

PrintDest OdAuditInfo::getPrintDest ( )

Returns the destination for log printing.

Remarks
getPrintDest() returns one of the following:

Value Description kSilent 0 None. kCmdLine 1 Command line. kFile 2 File. kBoth 3 Both command line and file.

◆ incNumEntities()

void OdAuditInfo::incNumEntities ( )

Increments by one the number of errors reported as processed to this AuditInfo object.

◆ numEntities()

int OdAuditInfo::numEntities ( )

Returns the number of entities reported as processed to this AuditInfo object.

◆ numErrors()

int OdAuditInfo::numErrors ( ) const

Returns the number of errors reported to this AuditInfo object.

◆ numFixes()

int OdAuditInfo::numFixes ( ) const

Returns the number of errors reported as fixed to this AuditInfo object.

◆ printError() [1/2]

virtual void OdAuditInfo::printError ( const OdRxObject pObject,
const OdString value,
const OdString validation = OdString::kEmpty,
const OdString defaultValue = OdString::kEmpty 
)
virtual

Notification function called to print error information.

Parameters
pObject[in] Pointer to the object which generated the error.
value[in] Value of the bad data.
validation[in] Reason the data were bad.
defaultValue[in] Default value to which the were set.
Remarks
pObject->isA()->name() is used to generate the name.

Reimplemented in OdDbAuditInfo.

◆ printError() [2/2]

virtual void OdAuditInfo::printError ( const OdString name,
const OdString value,
const OdString validation = OdString::kEmpty,
const OdString defaultValue = OdString::kEmpty 
)
virtual

Notification function called to print error information.

Remarks
Prints log information about an error detected or fixed during an audit.
Parameters
name[in] Type of erroneous data found.
value[in] Value of the bad data.
validation[in] Reason the data were bad.
defaultValue[in] Default value to which the were set.
Remarks
As implemented, this functions does nothing.

Reimplemented in OdDbAuditInfo.

◆ printInfo()

virtual void OdAuditInfo::printInfo ( const OdString logInfo)
virtual

Notification function called to print log information.

Parameters
logInfo[in] Log information.

◆ requestRegen()

void OdAuditInfo::requestRegen ( )

Allows fixed objects to specify a regen is required.

◆ resetNumEntities()

void OdAuditInfo::resetNumEntities ( )

Resets the number of errors reported to this AuditInfo object.

◆ setFixErrors()

void OdAuditInfo::setFixErrors ( bool  fixErrors)

Controls the fixing of errors are to be fixed during the audit that uses this AuditInfo object.

Parameters
fixErrors[in] Fix errors.

◆ setLastInfo()

virtual void OdAuditInfo::setLastInfo ( MsgInfo lastInfo)
virtual

Sets the last error information that is intended for printing.

Parameters
lastInfo[in] Last error information.

◆ setPrintDest()

void OdAuditInfo::setPrintDest ( PrintDest  printDest)

Sets the destination for log printing.

Parameters
printDest[in] Print destination.
Remarks
printDest must be one of the following:

Value Description kSilent 0 None. kCmdLine 1 Command line. kFile 2 File. kBoth 3 Both command line and file.


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