Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

messageManager Class Reference

Manager to handle the message of the classes and define an ostream output. More...

#include <messageManager.h>

Inheritance diagram for messageManager:

serviceI messageVI optionVI nameVI nameVI List of all members.

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

messageVIgetMessage (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


Detailed Description

Manager to handle the message of the classes and define an ostream output.

Definition at line 33 of file messageManager.h.


Constructor & Destructor Documentation

messageManager::messageManager ( )

default constructor.

Definition at line 8 of file messageManager.cpp.

messageManager::~messageManager ( ) [inline, virtual]

default constructor.

Definition at line 49 of file messageManager.cpp.


Member Function Documentation

bool messageManager::acceptLevel ( std::string slevel ) const

returns true if the string level is smaller that the messageManager level.

Definition at line 83 of file messageManager.cpp.

void messageManager::addToServer ( std::string name,
messageVI * mp )

add an object, with a name into the server.

Definition at line 55 of file messageManager.cpp.

void messageManager::close ( )

close the output file for messages.

Definition at line 34 of file messageManager.cpp.

void messageManager::defineOption ( ) [inline, protected, virtual]

define the options of this class.

Reimplemented from optionVI.

Definition at line 90 of file messageManager.cpp.

messageVI * messageManager::getMessage ( std::string name ) const [protected]

returns the messageVI of the object with name.

Definition at line 98 of file messageManager.cpp.

messageManager * messageManager::instance ( ) [inline, static]

Singleton.

Definition at line 46 of file messageManager.h.

void messageManager::message ( std::string message,
double val,
std::string ilevel = "RELEASE" ) const [virtual]

send a string + double message with level (messageVI).

Reimplemented from messageVI.

Definition at line 76 of file messageManager.cpp.

void messageManager::message ( std::string message,
std::string ilevel = "RELEASE" ) const [virtual]

send a string message with level (messageVI).

Reimplemented from messageVI.

Definition at line 70 of file messageManager.cpp.

void messageManager::open ( std::string fileName )

open the output fileName file for messages.

make a favor: optionManager is constructed before messageManager.

Definition at line 26 of file messageManager.cpp.

std::ostream & messageManager::out ( ) const

ostream of the output.

Definition at line 62 of file messageManager.cpp.

void messageManager::setOption ( std::string var,
std::string content ) [inline, protected, virtual]

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.

void messageManager::writeOut ( ) const [virtual]

writeOut the information of the messageManager only.

Reimplemented from messageVI.

Definition at line 121 of file messageManager.cpp.

void messageManager::writeOut ( std::string name ) const

execute the writeOut() method for the object with name;.

Definition at line 114 of file messageManager.cpp.

void messageManager::writeOutServer ( ) const

execute writeOut for all the objects in the server.

Definition at line 108 of file messageManager.cpp.


Friends And Related Function Documentation

class messageVI [friend]

Definition at line 36 of file messageManager.h.


Member Data Documentation

bool messageManager::m_definedFile [private]

bool is the file has been defined.

Definition at line 103 of file messageManager.h.

std::ofstream messageManager::m_file [private]

the ostream of the output.

Definition at line 106 of file messageManager.h.

std::string messageManager::m_fileName [private]

name of the output file.

Definition at line 100 of file messageManager.h.

messageManager * messageManager::m_instance = 0 [static, private]

Singleton: pointer to itself.

Definition at line 92 of file messageManager.h.

std::string messageManager::m_level [private]

level of the message.

Reimplemented from messageVI.

Definition at line 98 of file messageManager.h.

serverVI<messageVI>* messageManager::m_server [private]

server with the classes derived from messageVI.

Definition at line 95 of file messageManager.h.


The documentation for this class was generated from the following files:
Generated at Fri Aug 18 12:57:41 2000 for centella framework by doxygen 1.1.3 written by Dimitri van Heesch, © 1997-2000