Loading...
Searching...
No Matches
VdfExecutorErrorLogger Class Reference

A client may instantiate an object of this class and set it in an executor, to collect errors that may have been reported by nodes during a call to Run() on the executor. More...

#include <executorErrorLogger.h>

Public Types

using NodeToStringMap = tbb::concurrent_unordered_map< const VdfNode *, std::string >
 A thread safe map from node pointer to string for logging warnings.
 

Public Member Functions

VDF_API VdfExecutorErrorLogger ()
 Ctor.
 
VDF_API ~VdfExecutorErrorLogger ()
 Dtor.
 
Accessors API
VDF_API const NodeToStringMapGetWarnings () const
 Returns a map that maps nodes to warning strings that were encountered during a call to Run().
 
Logging API
VDF_API void LogWarning (const VdfNode &node, const std::string &warning) const
 Logs a warning against node.
 

Reporting API

VDF_API void ReportWarnings () const
 Reports warnings using node debug names.
 
static VDF_API void IssueDefaultWarning (const VdfNode &node, const std::string &warning)
 Prints out default warning message based on node's debug name.
 

Detailed Description

A client may instantiate an object of this class and set it in an executor, to collect errors that may have been reported by nodes during a call to Run() on the executor.

Since since API is used by executors it is partly thread-safe as noted below.

Definition at line 33 of file executorErrorLogger.h.

Member Typedef Documentation

◆ NodeToStringMap

using NodeToStringMap = tbb::concurrent_unordered_map<const VdfNode *, std::string>

A thread safe map from node pointer to string for logging warnings.

Definition at line 49 of file executorErrorLogger.h.

Constructor & Destructor Documentation

◆ VdfExecutorErrorLogger()

Ctor.

◆ ~VdfExecutorErrorLogger()

VDF_API ~VdfExecutorErrorLogger ( )

Dtor.

Member Function Documentation

◆ GetWarnings()

VDF_API const NodeToStringMap & GetWarnings ( ) const

Returns a map that maps nodes to warning strings that were encountered during a call to Run().

◆ IssueDefaultWarning()

static VDF_API void IssueDefaultWarning ( const VdfNode node,
const std::string &  warning 
)
static

Prints out default warning message based on node's debug name.

◆ LogWarning()

VDF_API void LogWarning ( const VdfNode node,
const std::string &  warning 
) const

Logs a warning against node.

Concatenates existing warnings, if any. This is thread-safe.

◆ ReportWarnings()

VDF_API void ReportWarnings ( ) const

Reports warnings using node debug names.

Usually a client will want to use GetWarnings() and report more meaningful messages.


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