Main Page
Namespaces
Classes
Files
File List
File Members
libism
ISM
soci
src
core
use.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
3
// Distributed under the Boost Software License, Version 1.0.
4
// (See accompanying file LICENSE_1_0.txt or copy at
5
// http://www.boost.org/LICENSE_1_0.txt)
6
//
7
8
#ifndef SOCI_USE_H_INCLUDED
9
#define SOCI_USE_H_INCLUDED
10
11
#include "
soci-backend.h
"
12
13
namespace
soci
14
{
15
16
namespace
details
17
{
18
template
<
typename
T,
typename
Indicator>
19
struct
use_container
20
{
21
use_container
(T &_t, Indicator &_ind,
const
std::string &_name)
22
:
t
(_t),
ind
(_ind),
name
(_name) {}
23
24
T &
t
;
25
Indicator &
ind
;
26
const
std::string &
name
;
27
};
28
29
typedef
void
no_indicator
;
30
template
<
typename
T>
31
struct
use_container
<T, no_indicator>
32
{
33
use_container
(T &_t,
const
std::string &_name)
34
:
t
(_t),
name
(_name) {}
35
36
T &
t
;
37
const
std::string &
name
;
38
};
39
40
}
// namespace details
41
42
template
<
typename
T>
43
details::use_container<T, details::no_indicator>
use
(T &
t
,
const
std::string &
name
= std::string())
44
{
return
details::use_container<T, details::no_indicator>
(
t
,
name
); }
45
46
template
<
typename
T>
47
details::use_container<const T, details::no_indicator>
use
(T
const
&t,
const
std::string &
name
= std::string())
48
{
return
details::use_container<const T, details::no_indicator>
(
t
,
name
); }
49
50
template
<
typename
T>
51
details::use_container<T, indicator>
use
(T &t,
indicator
&
ind
, std::string
const
&
name
= std::string())
52
{
return
details::use_container<T, indicator>
(
t
,
ind
,
name
); }
53
54
template
<
typename
T>
55
details::use_container<const T, indicator>
use
(T
const
&t,
indicator
& ind, std::string
const
&
name
= std::string())
56
{
return
details::use_container<const T, indicator>
(
t
,
ind
,
name
); }
57
58
// vector containers
59
template
<
typename
T>
60
details::use_container<T, std::vector<indicator>
>
61
use
(T &t, std::vector<indicator> & ind,
const
std::string &
name
= std::string())
62
{
return
details::use_container<T, std::vector<indicator>
>(
t
,
ind
,
name
); }
63
64
template
<
typename
T>
65
details::use_container<std::vector<T>
,
details::no_indicator
>
66
use
(std::vector<T> &t,
const
std::string &
name
= std::string())
67
{
return
details::use_container<std::vector<T>,
details::no_indicator
>(
t
,
name
); }
68
69
}
// namespace soci
70
71
#endif // SOCI_USE_H_INCLUDED
soci::details::use_container< T, no_indicator >::name
const std::string & name
Definition:
use.h:37
soci-backend.h
soci::details::use_container::use_container
use_container(T &_t, Indicator &_ind, const std::string &_name)
Definition:
use.h:21
soci::details::use_container< T, no_indicator >::t
T & t
Definition:
use.h:36
soci::details::use_container< T, no_indicator >::use_container
use_container(T &_t, const std::string &_name)
Definition:
use.h:33
soci::details::no_indicator
void no_indicator
Definition:
into.h:37
soci::details::use_container::name
const std::string & name
Definition:
use.h:26
soci::details::use_container::t
T & t
Definition:
use.h:24
soci::details::use_container
Definition:
use.h:19
soci::indicator
indicator
Definition:
soci-backend.h:28
soci::details::use_container::ind
Indicator & ind
Definition:
use.h:25
soci
Definition:
db2/common.h:15
soci::use
details::use_container< T, details::no_indicator > use(T &t, const std::string &name=std::string())
Definition:
use.h:43
asr_lib_ism
Author(s): Hanselmann Fabian, Heller Florian, Heizmann Heinrich, Kübler Marcel, Mehlhaus Jonas, Meißner Pascal, Qattan Mohamad, Reckling Reno, Stroh Daniel
autogenerated on Wed Jan 8 2020 04:02:41