PAASS
Software suite to Acquire and Analyze Data from Pixie16
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 More...
 
std::ofstream fout_
 the output file stream More...
 
bool file_
 true if the file is opened More...
 

Static Private Attributes

static bool endline_ = true
 true if we have an endline More...
 

Detailed Description

This class outputs nicely formatted messages during configuration loading.

Definition at line 19 of file Messenger.hpp.

Constructor & Destructor Documentation

§ Messenger() [1/2]

Messenger::Messenger ( )
inline

Default constructors sets output to std::cout

Definition at line 22 of file Messenger.hpp.

§ Messenger() [2/2]

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

Sets output to file.

Parameters
[in]name: the name of the output file

Definition at line 29 of file Messenger.hpp.

§ ~Messenger()

Messenger::~Messenger ( )
inline

Default destructor (closes the file)

Definition at line 88 of file Messenger.hpp.

Member Function Documentation

§ detail()

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

Definition at line 10 of file Messenger.cpp.

Here is the caller graph for this function:

§ done()

void Messenger::done ( )
inline

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

Definition at line 68 of file Messenger.hpp.

Here is the caller graph for this function:

§ fail()

void Messenger::fail ( )
inline

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

Definition at line 78 of file Messenger.hpp.

Here is the caller graph for this function:

§ run_message()

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

Message shown during scanning

Parameters
[in]msg: the message to output

Definition at line 49 of file Messenger.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ start()

void Messenger::start ( std::string  msg)
inline

Start of some main category.

Parameters
[in]msg: the message to output

Definition at line 42 of file Messenger.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ warning()

void Messenger::warning ( std::string  msg,
short  level = 0 
)

Warning message

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

Definition at line 45 of file Messenger.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

§ endline_

bool Messenger::endline_ = true
staticprivate

true if we have an endline

Definition at line 97 of file Messenger.hpp.

§ file_

bool Messenger::file_
private

true if the file is opened

Definition at line 96 of file Messenger.hpp.

§ fout_

std::ofstream Messenger::fout_
private

the output file stream

Definition at line 95 of file Messenger.hpp.

§ out_

std::ostream* Messenger::out_
private

the output stream

Definition at line 94 of file Messenger.hpp.


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