API  4.3
For MATLAB, Python, Java, and C++ users
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
 

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: