Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

rdbModel::Manager Class Reference

#include <Manager.h>

List of all members.

Public Member Functions

int build ()
int build ()
void cleanRdb ()
void cleanRdb ()
std::string getInputSourceString ()
std::string getInputSourceString ()
RdbgetRdb ()
RdbgetRdb ()
void setBuilder (Builder *b)
void setBuilder (Builder *b)
void setInputSource (std::string pname)
void setInputSource (std::string pname)
void startVisitor (Visitor *)
 This method starts the visit of a hierarchy with a specified visitor.
void startVisitor (Visitor *)
 This method starts the visit of a hierarchy with a specified visitor.
 ~Manager ()
 ~Manager ()

Static Public Member Functions

ManagergetManager ()
ManagergetManager ()

Protected Member Functions

 Manager ()
 Manager ()

Private Attributes

Builderm_builder
Builderm_builder
std::string m_filename
Rdbm_rdb
Rdbm_rdb

Static Private Attributes

Managers_pMyself
Managers_pMyself = 0


Detailed Description

This class implement the manager for the sections part of the XML file. It is a singleton.
Author:
D.Favretto & R.Giannitrapani


Constructor & Destructor Documentation

rdbModel::Manager::~Manager  ) 
 

The destructor must be invoched by the client before leaving the application. It will destroy explicitely the Rdb object and this will start the deallocation of all the objects hierarchy

00018                    {
00019     delete m_rdb;
00020     delete m_builder;
00021     s_pMyself = 0;
00022   }

rdbModel::Manager::Manager  )  [inline, protected]
 

The constructor is protected; in such a way it is forbidden to * build directely a manager. Here the new Rdb object is explicitely built

00061 :m_builder(0)  {m_rdb = new Rdb;};

rdbModel::Manager::~Manager  ) 
 

The destructor must be invoched by the client before leaving the application. It will destroy explicitely the Rdb object and this will start the deallocation of all the objects hierarchy

rdbModel::Manager::Manager  )  [inline, protected]
 

The constructor is protected; in such a way it is forbidden to * build directely a manager. Here the new Rdb object is explicitely built

00061 :m_builder(0)  {m_rdb = new Rdb;};


Member Function Documentation

int rdbModel::Manager::build  ) 
 

This method start the parse of the xml file by the builder. It returns an error code (0 if all ok)

int rdbModel::Manager::build  ) 
 

This method start the parse of the xml file by the builder. It returns an error code (0 if all ok)

00043                      {
00044     int errCode = m_builder->parseInput(m_filename);
00045 
00046     // Unlike geometry description/detModel, there is only one way to 
00047     // build here: build everything.
00048     if (!errCode) {
00049       return m_builder->buildRdb();
00050     }
00051     else return errCode;
00052   }

void rdbModel::Manager::cleanRdb  ) 
 

void rdbModel::Manager::cleanRdb  ) 
 

00031                         {
00032     delete m_rdb; 
00033     m_rdb = new Rdb; 
00034     //  delete manBuilder;
00035   }

std::string rdbModel::Manager::getInputSourceString  )  [inline]
 

00052 {return m_filename;};

std::string rdbModel::Manager::getInputSourceString  )  [inline]
 

00052 {return m_filename;};

Manager* rdbModel::Manager::getManager  )  [static]
 

This method is used to access the pointer to the singleton

Manager * rdbModel::Manager::getManager  )  [static]
 

This method is used to access the pointer to the singleton

00025   {
00026     if (s_pMyself == 0)
00027       s_pMyself = new Manager;
00028     return s_pMyself;
00029   }

Rdb* rdbModel::Manager::getRdb  )  [inline]
 

This method gives back the pointer to the Rdb object. It coule be used by expert clients to access information without the need of a visitor

00048 {return m_rdb;};

Rdb* rdbModel::Manager::getRdb  )  [inline]
 

This method gives back the pointer to the Rdb object. It coule be used by expert clients to access information without the need of a visitor

00048 {return m_rdb;};

void rdbModel::Manager::setBuilder Builder b  ) 
 

This method is used to specify a builder to be used by the manager.

void rdbModel::Manager::setBuilder Builder b  ) 
 

This method is used to specify a builder to be used by the manager.

00038   {
00039     m_builder = b;
00040   
00041   }

void rdbModel::Manager::setInputSource std::string  pname  )  [inline]
 

00051 {m_filename = pname;};

void rdbModel::Manager::setInputSource std::string  pname  )  [inline]
 

00051 {m_filename = pname;};

void rdbModel::Manager::startVisitor Visitor  ) 
 

This method starts the visit of a hierarchy with a specified visitor.

void rdbModel::Manager::startVisitor Visitor  ) 
 

This method starts the visit of a hierarchy with a specified visitor.

00054   {
00055     //    if (TablesVisitor* tv = dynamic_cast<TablesVisitor*>(v))      
00056     //    {   // the only kind we support, at least for now
00057       
00058     //      if (v->getRecursive())
00059         m_rdb->accept(v);
00060         //      else
00061         //        m_rdb->acceptNotRec(sv);
00062         //    }
00063   }


Member Data Documentation

Builder* rdbModel::Manager::m_builder [private]
 

This is a private pointer to the builder used by the manager to build the hierarchy from the XML file

Builder* rdbModel::Manager::m_builder [private]
 

This is a private pointer to the builder used by the manager to build the hierarchy from the XML file

std::string rdbModel::Manager::m_filename [private]
 

Rdb* rdbModel::Manager::m_rdb [private]
 

This is a private pointer to the Rdb object that provide the entry point to all information about all tables.

Rdb* rdbModel::Manager::m_rdb [private]
 

This is a private pointer to the Rdb object that provide the entry point to all information about all tables.

Manager* rdbModel::Manager::s_pMyself [static, private]
 

This is the pointer to the only manager that can be instanciated

Manager * rdbModel::Manager::s_pMyself = 0 [static, private]
 

This is the pointer to the only manager that can be instanciated


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 19:22:20 2011 for BOSS6.5.5 by  doxygen 1.3.9.1