API  4.4
For C++ developers
OpenSim::StringLogSink Class Reference

This sink stores all messages in a string. More...

+ Inheritance diagram for OpenSim::StringLogSink:

Public Member Functions

void clear ()
 Clear the contents of the string. More...
 
const std::string & getString () const
 Obtain the string. More...
 
- Public Member Functions inherited from OpenSim::LogSink
virtual ~LogSink ()=default
 

Protected Member Functions

void sinkImpl (const std::string &msg) override
 This function is invoked whenever a message is logged at the desired Log::Level. More...
 
- Protected Member Functions inherited from OpenSim::LogSink
virtual void flushImpl ()
 

Detailed Description

This sink stores all messages in a string.

This is useful for testing the content of logs.

Member Function Documentation

◆ clear()

void OpenSim::StringLogSink::clear ( )
inline

Clear the contents of the string.

◆ getString()

const std::string& OpenSim::StringLogSink::getString ( ) const
inline

Obtain the string.

◆ sinkImpl()

void OpenSim::StringLogSink::sinkImpl ( const std::string &  msg)
inlineoverrideprotectedvirtual

This function is invoked whenever a message is logged at the desired Log::Level.

Implements OpenSim::LogSink.


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