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 
17  : rcst_(new ref_counted_statement(s))
18 {
19  // this is the beginning of new query
20  s.get_query_stream().str("");
21 }
22 
24  :rcst_(o.rcst_)
25 {
26  rcst_->inc_ref();
27 }
28 
30 {
31  o.rcst_->inc_ref();
32  rcst_->dec_ref();
33  rcst_ = o.rcst_;
34 
35  return *this;
36 }
37 
39 {
40  rcst_->dec_ref();
41 }
42 
44 {
45  rcst_->exchange(i);
46  return *this;
47 }
~once_temp_type() SOCI_ONCE_TEMP_TYPE_NOEXCEPT
std::ostringstream & get_query_stream()
once_temp_type & operator,(into_type_ptr const &)
ref_counted_statement * rcst_
once_temp_type & operator=(once_temp_type const &o)
#define SOCI_ONCE_TEMP_TYPE_NOEXCEPT


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