User Manual, Developers Guide and API Documentation

wns::logger::Message Class Reference

Messages are used in conjunction with Logger instead of simple "cout-Logging".

#include <logger/Message.hpp>

Collaboration diagram for wns::logger::Message:

Collaboration graph
[legend]

List of all members.

Public Member Functions

long int getLevel () const
 Return the verbosity level of the Message.
std::string getString () const
 Return the content of the Message as std::string.
 Message (const Message &m)
 Copy constructor.
 Message (const std::string &m, long int _level)
 Constructor setting an initial message and verbosity level.
 Message (const std::string &m)
 Constuctor setting an initial message.
 Message ()
 Default constructor.
template<typename Input>
Messageoperator<< (const Input &i)
 Use Messages like streams ...

Private Attributes

long int level
 The verbosity level of the message.
std::stringstream message
 content of the Message

Friends

std::stringstream & operator<< (std::stringstream &str, const Message &m)
 Use Message like streams ...


Detailed Description

Definition at line 41 of file Message.hpp.


Constructor & Destructor Documentation

Message::Message (  ) 

Definition at line 32 of file Message.cpp.

Message::Message ( const std::string &  m  )  [explicit]

Definition at line 37 of file Message.cpp.

Message::Message ( const std::string &  m,
long int  _level 
)

Definition at line 44 of file Message.cpp.

Message::Message ( const Message m  ) 

Definition at line 51 of file Message.cpp.


Member Function Documentation

long int Message::getLevel (  )  const

Definition at line 65 of file Message.cpp.

std::string Message::getString (  )  const

Definition at line 59 of file Message.cpp.

template<typename Input>
Message& wns::logger::Message::operator<< ( const Input &  i  )  [inline]

Definition at line 70 of file Message.hpp.


Friends And Related Function Documentation

std::stringstream& operator<< ( std::stringstream &  str,
const Message m 
) [friend]

Usgae: stringstream << Message;

Definition at line 83 of file Message.hpp.


Member Data Documentation

Definition at line 110 of file Message.hpp.

std::stringstream wns::logger::Message::message [private]

Definition at line 105 of file Message.hpp.


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

Generated on Sun May 27 03:33:00 2012 for openWNS by  doxygen 1.5.5