StdAir Logo  1.00.21
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
DBSessionManager.hpp
Go to the documentation of this file.
1#ifndef __STDAIR_SVC_DBSESSIONMANAGER_HPP
2#define __STDAIR_SVC_DBSESSIONMANAGER_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// StdAir
9
10namespace stdair {
11
12 // Forward declarations
13 struct BasDBParams;
14
17 class DBSessionManager {
18 // Friend classes
19 friend class FacSupervisor;
20 friend class STDAIR_Service;
21
22 public:
24 static DBSessionManager& instance();
25
29
30
31 private:
34 DBSessionManager ();
36 DBSessionManager (const DBSessionManager&);
38 ~DBSessionManager ();
39
42 void dbInit (const BasDBParams&);
43
46 void dbFinalise ();
47
48
49 private:
52 static void init (const BasDBParams&);
53
55 static void clean();
56
57
58 private:
60 DBSession_T* _dbSession;
61 };
62
63}
64#endif // __STDAIR_SVC_DBSESSIONMANAGER_HPP
Handle on the StdAir library context.
soci::session DBSession_T
Definition stdair_db.hpp:20
Structure holding the parameters for connection to a database.
static DBSessionManager & instance()
DBSession_T & getDBSession() const