ContRap-Core
Public Member Functions | Protected Attributes

crp::LoggerMessage Class Reference

Class LoggerMessage represents a message with type, string, and sender. More...

#include <logger.h>

Public Member Functions

 LoggerMessage (const std::string &message, MessageType type=COMMENT_MESSAGE, const std::string &sender="")
 Logger message from properties.
std::string & get_message ()
 Returns the message.
MessageType get_type () const
 Returns the type.
std::string & get_sender ()
 Returns the sender.
std::string to_string () const
 Converts the message to a string.

Protected Attributes

std::string message
 Message of the logger.
MessageType type
 Type of the message.
std::string sender
 Name of the sender.

Detailed Description

Class LoggerMessage represents a message with type, string, and sender.


Constructor & Destructor Documentation

crp::LoggerMessage::LoggerMessage ( const std::string &  message,
MessageType  type = COMMENT_MESSAGE,
const std::string &  sender = "" 
) [inline]

Logger message from properties.

Parameters:
messageString of the message
typeType of the message
senderA string identifying the caller

Member Function Documentation

std::string& crp::LoggerMessage::get_message ( ) [inline]

Returns the message.

Returns:
Message string
std::string& crp::LoggerMessage::get_sender ( ) [inline]

Returns the sender.

Returns:
Sender of the message
MessageType crp::LoggerMessage::get_type ( ) const [inline]

Returns the type.

Returns:
Type of the message
std::string crp::LoggerMessage::to_string ( ) const [inline]

Converts the message to a string.

Returns:
String of the message

Field Documentation

std::string crp::LoggerMessage::message [protected]

Message of the logger.

std::string crp::LoggerMessage::sender [protected]

Name of the sender.

Type of the message.


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