ODA PRC SDK audit functionality is not implemented yet. The audit public
interface will be used for future implementation.
Auditing is a process of checking PRC contents for errors. If errors are found,
error information is stored and can be retrieved for displaying or other purposes.
Audit of a .prc file can be implemented through the following steps:
Load an ODA Platform module for .prc functionality support:
The prcName parameter should contain the full path to the audited .prc
file. The auditInfo parameter contains a pointer to an audit information
class and notifies whether error checking should be performed while reading
the .prc file's content.
Print the results of error checking:
if (auditInfo->errorsFound())
{
const OdStringArray& info = auditInfo->errorInfo(); odPrintConsoleString(L"\nAudit reported %d error(s):\n", info.size()); for(OdUInt32 f=0; f(info.size(); ++f)
{
odPrintConsoleString(L"%ls\n", info[f].c_str());
}
}
else
{
odPrintConsoleString(L"\nAudit reported no errors.");
}
To provide correct handling of possible errors, the auditing source code can
use a try ... catch section: