#include <messageManager.h>
Inheritance diagram for messageManager:
Public Methods | |
messageManager () | |
default constructor. | |
virtual | ~messageManager () |
default constructor. | |
std::ostream& | out () const |
ostream of the output. | |
void | open (std::string fileName) |
open the output fileName file for messages. More... | |
void | close () |
close the output file for messages. | |
void | message (std::string message, std::string ilevel = "RELEASE") const |
send a string message with level (messageVI). | |
void | message (std::string message, double val, std::string ilevel = "RELEASE") const |
send a string + double message with level (messageVI). | |
bool | acceptLevel (std::string slevel) const |
returns true if the string level is smaller that the messageManager level. | |
void | addToServer (std::string name, messageVI* mp) |
add an object, with a name into the server. | |
void | writeOutServer () const |
execute writeOut for all the objects in the server. | |
void | writeOut (std::string name) const |
execute the writeOut() method for the object with name;. | |
void | writeOut () const |
writeOut the information of the messageManager only. | |
Static Public Methods | |
messageManager* | instance () |
Singleton. | |
Protected Methods | |
messageVI* | getMessage (std::string name) const |
returns the messageVI of the object with name. | |
virtual void | defineOption () |
define the options of this class. | |
virtual void | setOption (std::string var, std::string content) |
overwrites virtual method to define option. More... | |
Private Attributes | |
serverVI<messageVI>* | m_server |
server with the classes derived from messageVI. | |
std::string | m_level |
level of the message. | |
std::string | m_fileName |
name of the output file. | |
bool | m_definedFile |
bool is the file has been defined. | |
std::ofstream | m_file |
the ostream of the output. | |
Static Private Attributes | |
messageManager* | m_instance = 0 |
Singleton: pointer to itself. | |
Friends | |
class | messageVI |
out())
where to send the messages. The output can be a file or the screen (std::cout). The method open()
define and open a file to send the messages to. acceptLevel()
method. The message() methods are inherits and overwriten from messageVI. writeOut(name)
executes the writeOut()
method of the object with name stored in the server.
Definition at line 33 of file messageManager.h.
|
|
|
returns true if the string level is smaller that the messageManager level.
Definition at line 83 of file messageManager.cpp.
|
|
|
define the options of this class.
Reimplemented from optionVI.
Definition at line 90 of file messageManager.cpp.
|
|
|
send a string + double message with level (messageVI).
Reimplemented from messageVI.
Definition at line 76 of file messageManager.cpp.
|
send a string message with level (messageVI).
Reimplemented from messageVI.
Definition at line 70 of file messageManager.cpp.
|
open the output fileName file for messages.
make a favor: optionManager is constructed before messageManager.
Definition at line 26 of file messageManager.cpp.
|
|
overwrites virtual method to define option.
It open the file or sets the level
Reimplemented from optionVI.
Definition at line 41 of file messageManager.cpp.
|
writeOut the information of the messageManager only.
Reimplemented from messageVI.
Definition at line 121 of file messageManager.cpp.
|
execute the writeOut() method for the object with name;.
Definition at line 114 of file messageManager.cpp.
|
execute writeOut for all the objects in the server.
Definition at line 108 of file messageManager.cpp.
|
Definition at line 36 of file messageManager.h.
|
|
|
|
|
|