globjects
2.0.0.690708773bba
Strict OpenGL objects wrapper.
|
Builds a LogMessage from different kinds of primitive types. More...
#include <globjects/include/globjects/base/LogMessageBuilder.h>
Public Types | |
using | PrecisionManipulator = decltype(std::setprecision(0)) |
using | FillManipulator = decltype(std::setfill('0')) |
using | WidthManipulator = decltype(std::setw(0)) |
Public Member Functions | |
LogMessageBuilder (LogMessageLevel level, AbstractLogHandler *handler) | |
LogMessageBuilder (const LogMessageBuilder &builder) | |
virtual | ~LogMessageBuilder () |
LogMessageBuilder & | operator<< (const char *c) |
LogMessageBuilder & | operator<< (const std::string &str) |
LogMessageBuilder & | operator<< (bool b) |
LogMessageBuilder & | operator<< (char c) |
LogMessageBuilder & | operator<< (int i) |
LogMessageBuilder & | operator<< (float f) |
LogMessageBuilder & | operator<< (double d) |
LogMessageBuilder & | operator<< (long double d) |
LogMessageBuilder & | operator<< (unsigned u) |
LogMessageBuilder & | operator<< (long l) |
LogMessageBuilder & | operator<< (long long l) |
LogMessageBuilder & | operator<< (unsigned long ul) |
LogMessageBuilder & | operator<< (unsigned char uc) |
LogMessageBuilder & | operator<< (const void *pointer) |
LogMessageBuilder & | operator<< (std::ostream &(*manipulator)(std::ostream &)) |
LogMessageBuilder & | operator<< (PrecisionManipulator manipulator) |
LogMessageBuilder & | operator<< (FillManipulator manipulator) |
LogMessageBuilder & | operator<< (WidthManipulator manipulator) |
template<typename T > | |
LogMessageBuilder & | operator<< (const T *pointer) |
template<typename T > | |
LogMessageBuilder & | operator<< (const std::vector< T > &vector) |
template<typename T > | |
LogMessageBuilder & | operator<< (const std::vector< T * > &vector) |
template<typename T > | |
LogMessageBuilder & | operator<< (const std::vector< std::unique_ptr< T >> &vector) |
template<typename T , std::size_t Count> | |
LogMessageBuilder & | operator<< (const std::array< T, Count > &array) |
template<typename T , std::size_t Count> | |
LogMessageBuilder & | operator<< (const std::array< T *, Count > &array) |
template<typename T , std::size_t Count> | |
LogMessageBuilder & | operator<< (const std::array< std::unique_ptr< T >, Count > &array) |
Protected Attributes | |
LogMessageLevel | m_level |
AbstractLogHandler * | m_handler |
std::shared_ptr< std::stringstream > | m_stream |
Builds a LogMessage from different kinds of primitive types.
The LogMessageBuilder is usually created by one of the global functions log, debug, warning, error or fatal. It works similar to streams and accepts a number of different types which will be converted to strings automatically. When it goes out of scope, it creates a LogMessage from all streamed objects and sends it to the log handler.
Typical usage of the LogMessageBuilder:
using globjects::LogMessageBuilder::PrecisionManipulator = decltype(std::setprecision(0)) |
using globjects::LogMessageBuilder::FillManipulator = decltype(std::setfill('0')) |
using globjects::LogMessageBuilder::WidthManipulator = decltype(std::setw(0)) |
globjects::LogMessageBuilder::LogMessageBuilder | ( | LogMessageLevel | level, |
AbstractLogHandler * | handler | ||
) |
globjects::LogMessageBuilder::LogMessageBuilder | ( | const LogMessageBuilder & | builder | ) |
|
virtual |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | const char * | c | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | const std::string & | str | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | bool | b | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | char | c | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | int | i | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | float | f | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | double | d | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | long double | d | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | unsigned | u | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | long | l | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | long long | l | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | unsigned long | ul | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | unsigned char | uc | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | const void * | pointer | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | std::ostream &(*)(std::ostream &) | manipulator | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | PrecisionManipulator | manipulator | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | FillManipulator | manipulator | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | WidthManipulator | manipulator | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | const T * | pointer | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | const std::vector< T > & | vector | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | const std::vector< T * > & | vector | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | const std::vector< std::unique_ptr< T >> & | vector | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | const std::array< T, Count > & | array | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | const std::array< T *, Count > & | array | ) |
LogMessageBuilder& globjects::LogMessageBuilder::operator<< | ( | const std::array< std::unique_ptr< T >, Count > & | array | ) |
|
protected |
|
protected |
|
protected |