BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Calibration/rdbModel/include/rdbModel/Management/Builder.h
Go to the documentation of this file.
1// $Header: /bes/bes/BossCvs/Calibration/rdbModel/rdbModel/Management/Builder.h,v 1.1.1.1
2// 2005/10/17 06:10:53 maqm Exp $
3
4#ifndef RDBMODEL_BUILDER_H
5#define RDBMODEL_BUILDER_H
6#include <string>
7
8namespace rdbModel {
9 class Rdb;
10
11 /**
12 * This class defines the public interface for the generic
13 * functionalities of a builder. Each subclass must provide
14 * implementation for its methods.
15 * @author J. Bogart,
16 * but basically stolen from detModel Builder
17 * Many thanks to R. Giannitrapani and D. Favretto
18 */
19 class Builder {
20 public:
22
23 /** This method parses the input into an intermediate in-memeory form.
24 * For now, the only acceptable input source is an xml file and the
25 * intermediate form is its DOM represenation. Conceivably
26 * could accept other forms someday.
27 * Return is to be interpreted as error code: 0 is ok.
28 */
29 virtual unsigned int parseInput( const std::string& ) = 0;
30
31 /** This method start the parser (implemented in a concrete
32 * subclass of this class) for the sections part and put the
33 * result in a private pointer
34 * Return is number of tables built. If negative, indicates
35 * error.
36 */
37 virtual int buildRdb() = 0;
38
39 void setRdb( Rdb* pRdb ) { m_currentRdb = pRdb; }
40
41 /** This method return a pointer to the internal
42 Rdb
43 */
44 Rdb* getRdb() { return m_currentRdb; };
45
46 protected:
47 /** This is a private pointer to an Rdb used
48 during the building */
50 };
51
52} // namespace rdbModel
53#endif // BUILDER_H
virtual unsigned int parseInput(const std::string &)=0
virtual int buildRdb()=0