C++ TargetRTS
All Classes Functions Variables Enumerations Enumerator Pages
Public Member Functions | List of all members
Log::Stream Class Reference

Public Member Functions

 Stream (const char *filename, bool overwrite=true)
 To append the log in file (e.g.
 
 Stream (std::ostream *stdStreamPtr)
 Logging for any ostream.
 
 Stream (Base *baseStreamPtr)
 Logging Base stream e.g.
 
Streamoperator<< (const RTTypedValue &info)
 Print an object to the log.
 
Streamoperator<< (std::ostream &(*manip)(std::ostream &))
 Invoke a manipulator on the stream, such as Log::endl or std::endl.
 
template<typename T >
Streamoperator<< (const T &value)
 Template function to print the value of variable to the log.
 

Constructor & Destructor Documentation

◆ Stream() [1/3]

Log::Stream::Stream ( const char *  filename,
bool  overwrite = true 
)

To append the log in file (e.g.

log.txt). File name should not have any invalid characters. File path should be valid else error message will display. If file already exist then new content will be appended.

Parameters
[in]filenameValid file name with absolute or relative path.
[in]overwriteIf the log file already exists its contents will either be overwritten or appended.

◆ Stream() [2/3]

Log::Stream::Stream ( std::ostream *  stdStreamPtr)

Logging for any ostream.

Parameters
[in]stdStreamPtrlet the Stream write log messages to an ostream.

◆ Stream() [3/3]

Log::Stream::Stream ( Base baseStreamPtr)

Logging Base stream e.g.

Log::out and Log::err

Parameters
[in]baseStreamPtrlet the Stream write log messages to base stream.

Member Function Documentation

◆ operator<<() [1/3]

Stream & Log::Stream::operator<< ( const RTTypedValue info)

Print an object to the log.

Parameters
[in]infoAn RTTypedValue object which encapsulates. the data object to print and its type descriptor.

◆ operator<<() [2/3]

template<typename T >
Stream & Log::Stream::operator<< ( const T &  value)
inline

Template function to print the value of variable to the log.

Parameters
[in]valueVariable value to print to the log.

◆ operator<<() [3/3]

Stream & Log::Stream::operator<< ( std::ostream &(*)(std::ostream &)  manip)

Invoke a manipulator on the stream, such as Log::endl or std::endl.

Parameters
[in]manipManipulator callback to the log.

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