OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
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
9namespace soci {
10 class session;
11}
12
13namespace OPENTREP {
14
15 // Forward declarations
16 struct DBParams;
17
21 class DBSessionManager {
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 ////////////////////
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
Class handling the SOCI session.
Structure holding the database parameters.
Definition DBParams.hpp:26