SOFA API  7352f41a
Open source framework for multi-physics simuation
sofa::helper::logging::ComponentInfo Struct Reference

#include <ComponentInfo.h>

Inheritance diagram for sofa::helper::logging::ComponentInfo:

Detailed Description

The base class to keep track of informations associated with a message. A component info object have a sender method to return the name string identifying the sender of a message.

Protected Attributes

std::string m_sender
 

Public Member Functions

 ComponentInfo ()
 
 ComponentInfo (const std::string &name)
 
virtual ~ComponentInfo ()
 
const std::string & sender () const
 Returns a string identifying the sender of a message. More...
 
virtual std::ostream & toStream (std::ostream &out) const
 

Friends

std::ostream & operator<< (std::ostream &out, const ComponentInfo &nfo)
 
std::ostream & operator<< (std::ostream &out, const ComponentInfo *nfo)
 

Attribute details

◆ m_sender

std::string sofa::helper::logging::ComponentInfo::m_sender
protected

Constructor details

◆ ComponentInfo() [1/2]

sofa::helper::logging::ComponentInfo::ComponentInfo ( )

◆ ComponentInfo() [2/2]

sofa::helper::logging::ComponentInfo::ComponentInfo ( const std::string &  name)

◆ ~ComponentInfo()

sofa::helper::logging::ComponentInfo::~ComponentInfo ( )
virtual

Function details

◆ sender()

const std::string & sofa::helper::logging::ComponentInfo::sender ( ) const

Returns a string identifying the sender of a message.

◆ toStream()

std::ostream & sofa::helper::logging::ComponentInfo::toStream ( std::ostream &  out) const
virtual

Write a textual version of the content of the ComponentInfo. You should override this function when inheriting from the ComponentInfo base class.

Reimplemented in sofa::helper::logging::SofaComponentInfo.

Related details

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  out,
const ComponentInfo nfo 
)
friend

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  out,
const ComponentInfo nfo 
)
friend