SOFA API  c4ac86de
Open source framework for multi-physics simuation
sofa::helper::system::SofaOStream< DefaultMessageType > Class Template Reference

#include <SofaOStream.h>

a SofaOStream is a std::ostringstream encapsulation that can stream a logging::FileInfo and a logging::Message::Type More...

Inheritance diagram for sofa::helper::system::SofaOStream< DefaultMessageType >:

Detailed Description

template<int DefaultMessageType = logging::Message::Info>
class sofa::helper::system::SofaOStream< DefaultMessageType >

a SofaOStream is a std::ostringstream encapsulation that can stream a logging::FileInfo and a logging::Message::Type

Protected Attributes

std::ostringstream & m_ostream
 the effective ostringstream More...
 
logging::FileInfo::SPtr m_fileInfo {helper::logging::EmptyFileInfo}
 the current FileInfo More...
 
logging::Message::Type m_messageType
 the current Message type More...
 
logging::Message::Class m_messageClass
 the current Message class More...
 

Public Member Functions

 SofaOStream (std::ostringstream &os)
 
bool operator== (const std::ostream &os)
 
std::string str () const
 
void str (const std::string &s)
 
std::streamsize precision () const
 
std::streamsize precision (std::streamsize p)
 
std::ostringstream & ostringstream () const
 
const logging::FileInfo::SPtrfileInfo () const
 
const logging::Message::TypemessageType () const
 
const logging::Message::ClassmessageClass () const
 
void clear ()
 clearing the SofaOStream (set empty string, empty FileInfo, default Message type) More...
 

Friends

SofaOStreamoperator<< (SofaOStream &out, const logging::FileInfo::SPtr &fi)
 
SofaOStreamoperator<< (SofaOStream &out, const logging::Message::Type &mt)
 
SofaOStreamoperator<< (SofaOStream &out, const logging::Message::Class &mc)
 
template<class T >
std::ostringstream & operator<< (SofaOStream &out, const T &t)
 

Attribute details

template<int DefaultMessageType = logging::Message::Info>
logging::FileInfo::SPtr sofa::helper::system::SofaOStream< DefaultMessageType >::m_fileInfo {helper::logging::EmptyFileInfo}
protected

the current FileInfo

template<int DefaultMessageType = logging::Message::Info>
logging::Message::Class sofa::helper::system::SofaOStream< DefaultMessageType >::m_messageClass
protected

the current Message class

template<int DefaultMessageType = logging::Message::Info>
logging::Message::Type sofa::helper::system::SofaOStream< DefaultMessageType >::m_messageType
protected

the current Message type

template<int DefaultMessageType = logging::Message::Info>
std::ostringstream& sofa::helper::system::SofaOStream< DefaultMessageType >::m_ostream
protected

the effective ostringstream

Constructor details

template<int DefaultMessageType = logging::Message::Info>
sofa::helper::system::SofaOStream< DefaultMessageType >::SofaOStream ( std::ostringstream &  os)
inline

Function details

template<int DefaultMessageType = logging::Message::Info>
void sofa::helper::system::SofaOStream< DefaultMessageType >::clear ( )
inline

clearing the SofaOStream (set empty string, empty FileInfo, default Message type)

template<int DefaultMessageType = logging::Message::Info>
const logging::FileInfo::SPtr& sofa::helper::system::SofaOStream< DefaultMessageType >::fileInfo ( ) const
inline
template<int DefaultMessageType = logging::Message::Info>
const logging::Message::Class& sofa::helper::system::SofaOStream< DefaultMessageType >::messageClass ( ) const
inline
template<int DefaultMessageType = logging::Message::Info>
const logging::Message::Type& sofa::helper::system::SofaOStream< DefaultMessageType >::messageType ( ) const
inline
template<int DefaultMessageType = logging::Message::Info>
bool sofa::helper::system::SofaOStream< DefaultMessageType >::operator== ( const std::ostream &  os)
inline
template<int DefaultMessageType = logging::Message::Info>
std::ostringstream& sofa::helper::system::SofaOStream< DefaultMessageType >::ostringstream ( ) const
inline
template<int DefaultMessageType = logging::Message::Info>
std::streamsize sofa::helper::system::SofaOStream< DefaultMessageType >::precision ( ) const
inline
template<int DefaultMessageType = logging::Message::Info>
std::streamsize sofa::helper::system::SofaOStream< DefaultMessageType >::precision ( std::streamsize  p)
inline
template<int DefaultMessageType = logging::Message::Info>
std::string sofa::helper::system::SofaOStream< DefaultMessageType >::str ( ) const
inline
template<int DefaultMessageType = logging::Message::Info>
void sofa::helper::system::SofaOStream< DefaultMessageType >::str ( const std::string &  s)
inline

Related details

template<int DefaultMessageType = logging::Message::Info>
SofaOStream& operator<< ( SofaOStream< DefaultMessageType > &  out,
const logging::FileInfo::SPtr fi 
)
friend
template<int DefaultMessageType = logging::Message::Info>
SofaOStream& operator<< ( SofaOStream< DefaultMessageType > &  out,
const logging::Message::Type mt 
)
friend
template<int DefaultMessageType = logging::Message::Info>
SofaOStream& operator<< ( SofaOStream< DefaultMessageType > &  out,
const logging::Message::Class mc 
)
friend
template<int DefaultMessageType = logging::Message::Info>
template<class T >
std::ostringstream& operator<< ( SofaOStream< DefaultMessageType > &  out,
const T t 
)
friend