0.6.0
C++ Open Travel Request Parsing Library
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
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
21
class
DBSessionManager
{
22
friend
class
OPENTREP_ServiceContext
;
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
48
DBSessionManager
();
49
53
DBSessionManager
(
const
DBSessionManager
&);
54
58
~
DBSessionManager
();
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
OPENTREP::OPENTREP_ServiceContext
Class holding the context of the OpenTrep services.
Definition:
OPENTREP_ServiceContext.hpp:27
OPENTREP::DBParams
Structure modelling a database parameters.
Definition:
DBParams.hpp:25
OPENTREP::DBSessionManager
Class handling the SOCI session.
Definition:
DBSessionManager.hpp:21
Generated on Mon Feb 3 2014 14:17:07 for OpenTREP by
1.8.6