1.00.8
C++ Standard Airline IT Object Library
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
8
#include <
stdair/stdair_db.hpp
>
9
10
namespace
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
28
DBSession_T
&
getDBSession
()
const
;
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
stdair_db.hpp
stdair
Handle on the StdAir library context.
Definition:
BasChronometer.cpp:9
stdair::DBSession_T
soci::session DBSession_T
Definition:
stdair_db.hpp:20
stdair::FacSupervisor
Definition:
FacSupervisor.hpp:20
stdair::DBSessionManager
Definition:
DBSessionManager.hpp:17
stdair::DBSessionManager::getDBSession
DBSession_T & getDBSession() const
Definition:
DBSessionManager.cpp:92
stdair::STDAIR_Service
Interface for the STDAIR Services.
Definition:
STDAIR_Service.hpp:44
stdair::BasDBParams
Structure holding the parameters for connection to a database.
Definition:
BasDBParams.hpp:19
stdair::DBSessionManager::instance
static DBSessionManager & instance()
Definition:
DBSessionManager.cpp:82
Generated for StdAir by
1.8.17