OpenVDB 13.2.0
Loading...
Searching...
No Matches
ReadDiagnostics Struct Reference

Thread-safe collection of read diagnostics accumulated during a codec read. More...

#include <openvdb/io/Codec.h>

Public Member Functions

 ReadDiagnostics ()=default
 ReadDiagnostics (const ReadDiagnostics &other)
ReadDiagnostics & operator= (const ReadDiagnostics &other)
void addWarning (const std::string &context, const std::string &message)
 Append a warning diagnostic. No-op if the object is disabled.
void clear ()
 Remove all recorded diagnostics.
void enable ()
 Enable diagnostic recording.
void disable ()
 Disable diagnostic recording.
bool enabled () const
 Return true if diagnostic recording is enabled.
const std::vector< ReadDiagnostic > & diagnostics () const
 Return the list of recorded diagnostics.
bool empty () const
 Return true if no diagnostics have been recorded.

Detailed Description

Thread-safe collection of read diagnostics accumulated during a codec read.

Diagnostics report situations where a requested read option could not be honoured by the codec — for example, clipping that was not applied natively and had to fall back to a post-process, or an option that the codec ignores entirely. The object must be explicitly enabled before any messages are recorded; it is disabled by default.

Constructor & Destructor Documentation

◆ ReadDiagnostics() [1/2]

ReadDiagnostics ( )
default

◆ ReadDiagnostics() [2/2]

ReadDiagnostics ( const ReadDiagnostics & other)
inline

Member Function Documentation

◆ addWarning()

void addWarning ( const std::string & context,
const std::string & message )
inline

Append a warning diagnostic. No-op if the object is disabled.

Note
This method is thread-safe.

◆ clear()

void clear ( )
inline

Remove all recorded diagnostics.

Note
This method is thread-safe.

◆ diagnostics()

const std::vector< ReadDiagnostic > & diagnostics ( ) const
inline

Return the list of recorded diagnostics.

◆ disable()

void disable ( )
inline

Disable diagnostic recording.

◆ empty()

bool empty ( ) const
inline

Return true if no diagnostics have been recorded.

◆ enable()

void enable ( )
inline

Enable diagnostic recording.

◆ enabled()

bool enabled ( ) const
inline

Return true if diagnostic recording is enabled.

◆ operator=()

ReadDiagnostics & operator= ( const ReadDiagnostics & other)
inline