StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
STDAIR_ServiceContext.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_SVC_STDAIRSERVICECONTEXT_HPP
2 #define __STDAIR_SVC_STDAIRSERVICECONTEXT_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 // StdAir
16 
17 namespace stdair {
18 
20  class BomRoot;
21 
29  friend class STDAIR_Service;
31 
32  private:
33  // ///////// Getters //////////
37  BomRoot& getPersistentBomRoot() const;
38 
42  BomRoot& getCloneBomRoot() const;
43 
47  ConfigHolderStruct& getConfigHolder() const;
48 
52  const BasDBParams& getDBParams() const {
53  return _dbParams;
54  }
55 
59  const ServiceInitialisationType& getServiceInitialisationType() const {
60  return _initType;
61  }
62 
63 
64  private:
65  // ///////// Setters //////////
69  void setDBParams (const BasDBParams& iDBParams) {
70  _dbParams = iDBParams;
71  }
72 
76  void setServiceInitialisationType (const ServiceInitialisationType& iSIT) {
77  _initType = iSIT;
78  }
79 
80 
81  private:
82  // ///////// Display Methods //////////
86  const std::string shortDisplay() const;
87 
91  const std::string display() const;
92 
96  const std::string describe() const;
97 
98 
99  private:
100  // /////// Construction / initialisation ////////
104  STDAIR_ServiceContext();
105 
112  STDAIR_ServiceContext (const STDAIR_ServiceContext&);
113 
117  ~STDAIR_ServiceContext();
118 
126  void init();
127 
134  void initBomRoot();
135 
142  void initCloneBomRoot();
143 
149  void initConfigHolder();
150 
151  private:
152  // ///////////// Children ////////////
156  BomRoot* _cloneBomRoot;
157 
161  BomRoot* _persistentBomRoot;
162 
166  ConfigHolderPtr_T _configHolderPtr;
167 
171  BasDBParams _dbParams;
172 
186  ServiceInitialisationType _initType;
187  };
188 
189 }
190 #endif // __STDAIR_SVC_STDAIRSERVICECONTEXT_HPP
Structure holding the parameters for connection to a database.
Definition: BasDBParams.hpp:19
Handle on the StdAir library context.
Enumeration of service initialisation types.
boost::shared_ptr< ConfigHolderStruct > ConfigHolderPtr_T
Class holding the context of the Stdair services.
Class representing the actual attributes for the Bom root.
Definition: BomRoot.hpp:32
Interface for the STDAIR Services.