The Sparta Modeling Framework
|
Temporary object for constructing a log message with a ostream-like interface. Emits a message to the message source upon destruction. More...
#include <MessageSource.hpp>
Public Member Functions | |
LogObject ()=delete | |
Not default-constructable. | |
LogObject (LogObject &&rhp) | |
Move constructor. | |
LogObject (const LogObject &rhp)=delete | |
Not Copy-constructable. | |
LogObject (const MessageSource &src) | |
Construct with message source. | |
template<class T > | |
LogObject (const MessageSource &src, const T &init) | |
Construct with an initial value. | |
LogObject (const MessageSource &src, std::ostream &(*f)(std::ostream &)) | |
Construct with a function operating on ostreams (e.g. std::setw) | |
~LogObject () | |
Destructor. | |
void | cancel () |
Cancel the LogObject by. | |
template<class T > | |
LogObject & | operator<< (const T &t) |
Insertion operator on this LogObject. | |
LogObject & | operator<< (std::ostream &(*f)(std::ostream &)) |
Handler for stream modifiers (e.g. endl) | |
Temporary object for constructing a log message with a ostream-like interface. Emits a message to the message source upon destruction.
This allows MessageSource::operator<< to string multiple insertions together just like cout waiting until the LogObject is destroyed to actually send the message to its destination
Definition at line 131 of file MessageSource.hpp.
|
inline |
Move constructor.
Definition at line 150 of file MessageSource.hpp.
|
inline |
Construct with message source.
Definition at line 161 of file MessageSource.hpp.
|
inline |
Construct with an initial value.
Definition at line 169 of file MessageSource.hpp.
|
inline |
Construct with a function operating on ostreams (e.g. std::setw)
Definition at line 179 of file MessageSource.hpp.
|
inline |
Destructor.
Sends the message constructed within this object through MessageSource::emit_
Definition at line 191 of file MessageSource.hpp.
|
inline |
Cancel the LogObject by.
Definition at line 200 of file MessageSource.hpp.
|
inline |
Insertion operator on this LogObject.
Appends object to internal ostringstream
Definition at line 211 of file MessageSource.hpp.
|
inline |
Handler for stream modifiers (e.g. endl)
Definition at line 219 of file MessageSource.hpp.