OpenTREP Logo  0.07.4
C++ Open Travel Request Parsing Library
DBSessionManager.hpp
Go to the documentation of this file.
1 #ifndef __OPENTREP_CMD_DBSESSIONMANAGER_HPP
2 #define __OPENTREP_CMD_DBSESSIONMANAGER_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 
8 // Forward declarations
9 namespace soci {
10  class session;
11 }
12 
13 namespace OPENTREP {
14 
15  // Forward declarations
16  struct DBParams;
17 
23  private:
24  // ////////////////// Getters ////////////////////
28  soci::session* getDBSession() const {
29  return _dbSession;
30  }
31 
35  soci::session& getDBSessionRef() const;
36 
37 
38  private:
39  // ////////////////// Constructors and Destructors ////////////////////
43  DBSessionManager (const DBParams&);
44 
49 
54 
59 
60  private:
64  void init (const DBParams&);
65 
66 
67  private:
68  // /////////////////////// Attributes //////////////////////
72  soci::session* _dbSession;
73  };
74 
75 }
76 #endif // __OPENTREP_CMD_DBSESSIONMANAGER_HPP
soci
Definition: DBManager.hpp:14
OPENTREP
Definition: BasChronometer.cpp:10
OPENTREP::OPENTREP_ServiceContext
Class holding the context of the OpenTrep services.
Definition: OPENTREP_ServiceContext.hpp:28
OPENTREP::DBSessionManager
Class handling the SOCI session.
Definition: DBSessionManager.hpp:21
OPENTREP::DBParams
Structure holding the database parameters.
Definition: DBParams.hpp:26