ge211  2021.5.1
A student game engine
Log_message Class Reference

Detailed Description

A Log_message accumulates information and then prints it all at once when it's about to be destroyed.

Definition at line 226 of file ge211_error.hxx.

Public Member Functions

 Log_message (Log_level level=Log_level::debug)
 Construct a new Log_message with the given log level. More...
 
 Log_message (std::string reason, Log_level level=Log_level::debug)
 Construct a new Log_message with the given log level and cause. More...
 
template<typename STREAM_INSERTABLE >
Log_messageoperator<< (STREAM_INSERTABLE const &value)
 Appends more text to this Log_message.
 
virtual ~Log_message ()
 A Log_message has important work to do when it's destroyed.
 
 Log_message (const Log_message &)=delete
 A Log_message cannot be copied, since that would cause it to print twice.
 
Log_messageoperator= (const Log_message &)=delete
 A Log_message cannot be copied, since that would cause it to print twice.
 
 Log_message (Log_message &&)=default
 A log message can be moved. More...
 
Log_messageoperator= (Log_message &&)=default
 A log message can be move-assigned. More...
 

Constructor & Destructor Documentation

◆ Log_message() [1/3]

Log_message ( Log_level  level = Log_level::debug)
explicit

Construct a new Log_message with the given log level.

The default log level is Log_level::debug.

Definition at line 201 of file ge211_error.cxx.

◆ Log_message() [2/3]

Log_message ( std::string  reason,
Log_level  level = Log_level::debug 
)
explicit

Construct a new Log_message with the given log level and cause.

The default log level is Log_level::debug.

Definition at line 192 of file ge211_error.cxx.

◆ Log_message() [3/3]

Log_message ( Log_message &&  )
default

A log message can be moved.

The source of the move becomes inactive, meaning it won't print anything when destroyed.

Member Function Documentation

◆ operator=()

Log_message& operator= ( Log_message &&  )
default

A log message can be move-assigned.

The source of the move becomes inactive, meaning it won't print anything when destroyed.


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