VISR  0.11.8
Versatile Interactive Scene Renderer
visr::StatusMessage Class Reference

#include <status_message.hpp>

Public Types

enum  Kind : unsigned char {
  Information, Warning, Error, Abort,
  Critical
}
 

Static Public Member Functions

template<typename MessageType , typename... MessageRest>
static void format (std::ostream &str, MessageType const &msg, MessageRest ... rest)
 
template<typename MessageType >
static void format (std::ostream &str, MessageType const &msg)
 

Detailed Description

Class encapsulating facilities to signal messages and errors.

Member Enumeration Documentation

◆ Kind

enum visr::StatusMessage::Kind : unsigned char

Enumeration for different categories of status message.

Enumerator
Information 

An informational message.

Warning 

Warning message.

Error 

Error message, the issuer is responsible for returning from the current callback call.

The calling class (i.e., a component will be called again in the nest iteration.

Abort 

Severe error.

Execution should be terminated after the current iteration

Critical 

Critical error, control shall not return to the calling function.

Member Function Documentation

◆ format() [1/2]

template<typename MessageType , typename... MessageRest>
static void visr::StatusMessage::format ( std::ostream &  str,
MessageType const &  msg,
MessageRest ...  rest 
)
inlinestatic

Create a status message from an arbitrary sequence of arguments. This template function is invoked recursively (at compile time)

Template Parameters
MessageTypetype of the first argument
MessageRestparameter type holding all arguments apart from the rest.
Parameters
strThe output stream to which the arguments are written to.
msgFirst argument. All types that have an <<operator() are acceptable.
restvariable-length list containing all parameters except the first.

◆ format() [2/2]

template<typename MessageType >
static void visr::StatusMessage::format ( std::ostream &  str,
MessageType const &  msg 
)
inlinestatic

Create a status message from an arbitrary sequence of arguments. This is the terminal case of the recursive formatStatusMessage() function above.

Template Parameters
MessageTypetype of the message argument
Parameters
strThe output stream to which the arguments are written to.
msgMessage argument. All types that have an <<operator() are acceptable.

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