Main Page
Namespaces
Classes
Files
File List
File Members
libism
ISM
soci
src
core
once-temp-type.cpp
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
#define SOCI_SOURCE
9
#include "
once-temp-type.h
"
10
#include "
ref-counted-statement.h
"
11
#include "
session.h
"
12
13
using namespace
soci
;
14
using namespace
soci::details
;
15
16
once_temp_type::once_temp_type
(
session
& s)
17
: rcst_(new
ref_counted_statement
(s))
18
{
19
// this is the beginning of new query
20
s.
get_query_stream
().str(
""
);
21
}
22
23
once_temp_type::once_temp_type
(
once_temp_type
const
& o)
24
:
rcst_
(o.
rcst_
)
25
{
26
rcst_
->
inc_ref
();
27
}
28
29
once_temp_type
&
once_temp_type::operator=
(
once_temp_type
const
& o)
30
{
31
o.
rcst_
->
inc_ref
();
32
rcst_
->
dec_ref
();
33
rcst_
= o.
rcst_
;
34
35
return
*
this
;
36
}
37
38
once_temp_type::~once_temp_type
()
SOCI_ONCE_TEMP_TYPE_NOEXCEPT
39
{
40
rcst_
->
dec_ref
();
41
}
42
43
once_temp_type
&
once_temp_type::operator,
(
into_type_ptr
const
& i)
44
{
45
rcst_
->
exchange
(i);
46
return
*
this
;
47
}
soci::details::once_temp_type::~once_temp_type
~once_temp_type() SOCI_ONCE_TEMP_TYPE_NOEXCEPT
Definition:
once-temp-type.cpp:38
soci::details::once_temp_type::once_temp_type
once_temp_type(session &s)
Definition:
once-temp-type.cpp:16
soci::details
Definition:
db2/common.h:15
session.h
soci::session::get_query_stream
std::ostringstream & get_query_stream()
Definition:
core/session.cpp:204
soci::details::once_temp_type
Definition:
once-temp-type.h:31
soci::details::ref_counted_statement_base::inc_ref
void inc_ref()
Definition:
ref-counted-statement.h:33
soci::details::ref_counted_statement
Definition:
ref-counted-statement.h:72
soci::details::once_temp_type::operator,
once_temp_type & operator,(into_type_ptr const &)
Definition:
once-temp-type.cpp:43
soci::details::once_temp_type::rcst_
ref_counted_statement * rcst_
Definition:
once-temp-type.h:63
soci::session
Definition:
session.h:40
soci::details::once_temp_type::operator=
once_temp_type & operator=(once_temp_type const &o)
Definition:
once-temp-type.cpp:29
SOCI_ONCE_TEMP_TYPE_NOEXCEPT
#define SOCI_ONCE_TEMP_TYPE_NOEXCEPT
Definition:
once-temp-type.h:17
soci::details::ref_counted_statement_base::dec_ref
void dec_ref()
Definition:
ref-counted-statement.h:34
soci::details::ref_counted_statement::exchange
void exchange(T &t)
Definition:
ref-counted-statement.h:81
soci::details::type_ptr
Definition:
type-ptr.h:14
soci
Definition:
db2/common.h:15
once-temp-type.h
ref-counted-statement.h
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:40