TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
sample::LogStreamConsumer Class Reference

Convenience object used to facilitate use of C++ stream syntax when logging messages. Order of base classes is LogStreamConsumerBase and then std::ostream. This is because the LogStreamConsumerBase class is used to initialize the LogStreamConsumerBuffer member field in LogStreamConsumer and then the address of the buffer is passed to std::ostream. This is necessary to prevent the address of an uninitialized buffer from being passed to std::ostream. Please do not change the order of the parent classes. More...

Inheritance diagram for sample::LogStreamConsumer:
Collaboration diagram for sample::LogStreamConsumer:

Public Member Functions

 LogStreamConsumer (Severity reportableSeverity, Severity severity)
 Creates a LogStreamConsumer which logs messages with level severity. More...
 
 LogStreamConsumer (LogStreamConsumer &&other)
 
void setReportableSeverity (Severity reportableSeverity)
 

Protected Attributes

LogStreamConsumerBuffer mBuffer
 

Static Private Member Functions

static std::ostream & severityOstream (Severity severity)
 
static std::string severityPrefix (Severity severity)
 

Private Attributes

bool mShouldLog
 
Severity mSeverity
 

Detailed Description

Convenience object used to facilitate use of C++ stream syntax when logging messages. Order of base classes is LogStreamConsumerBase and then std::ostream. This is because the LogStreamConsumerBase class is used to initialize the LogStreamConsumerBuffer member field in LogStreamConsumer and then the address of the buffer is passed to std::ostream. This is necessary to prevent the address of an uninitialized buffer from being passed to std::ostream. Please do not change the order of the parent classes.

Constructor & Destructor Documentation

◆ LogStreamConsumer() [1/2]

sample::LogStreamConsumer::LogStreamConsumer ( Severity  reportableSeverity,
Severity  severity 
)
inline

Creates a LogStreamConsumer which logs messages with level severity.

Reportable severity determines if the messages are severe enough to be logged.

◆ LogStreamConsumer() [2/2]

sample::LogStreamConsumer::LogStreamConsumer ( LogStreamConsumer &&  other)
inline

Member Function Documentation

◆ setReportableSeverity()

void sample::LogStreamConsumer::setReportableSeverity ( Severity  reportableSeverity)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ severityOstream()

static std::ostream& sample::LogStreamConsumer::severityOstream ( Severity  severity)
inlinestaticprivate

◆ severityPrefix()

static std::string sample::LogStreamConsumer::severityPrefix ( Severity  severity)
inlinestaticprivate

Member Data Documentation

◆ mShouldLog

bool sample::LogStreamConsumer::mShouldLog
private

◆ mSeverity

Severity sample::LogStreamConsumer::mSeverity
private

◆ mBuffer

LogStreamConsumerBuffer sample::LogStreamConsumerBase::mBuffer
protectedinherited

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