Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
Messenger Class Reference

This class outputs nicely formatted messages during configuration loading. More...

#include <Messenger.hpp>

Collaboration diagram for Messenger:

Public Member Functions

 Messenger ()
 
 Messenger (const std::string &name)
 
void start (std::string msg)
 
void detail (std::string msg, short level=0, std::string symbol="*")
 
void warning (std::string msg, short level=0)
 
void run_message (std::string msg)
 
void done ()
 
void fail ()
 
 ~Messenger ()
 

Private Attributes

std::ostream * out_
 the output stream
 
std::ofstream fout_
 the output file stream
 
bool file_
 true if the file is opened
 

Static Private Attributes

static bool endline_
 true if we have an endline
 

Detailed Description

This class outputs nicely formatted messages during configuration loading.

Constructor & Destructor Documentation

Messenger::Messenger ( )
inline

Default constructors sets output to std::cout

Messenger::Messenger ( const std::string &  name)
inline

Sets output to file.

Parameters
[in]name: the name of the output file
Messenger::~Messenger ( )
inline

Default destructor (closes the file)

Member Function Documentation

void Messenger::detail ( std::string  msg,
short  level = 0,
std::string  symbol = "*" 
)

Detail under main category, higer level parameter imposes more indentation of the message.

Parameters
[in]msg: the message to output
[in]level: the output level
[in]symbol: the symbol to use in the filler
void Messenger::done ( )
inline

At the end of main category, [Done] message.

void Messenger::fail ( )
inline

At the end of main category, [FAIL] message.

void Messenger::run_message ( std::string  msg)

Message shown during scanning

Parameters
[in]msg: the message to output
void Messenger::start ( std::string  msg)
inline

Start of some main category.

Parameters
[in]msg: the message to output
void Messenger::warning ( std::string  msg,
short  level = 0 
)

Warning message

Parameters
[in]msg: the message to output
[in]level: the output level

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