SOCI Logo Get SOCI at SourceForge.net. Fast, secure and Free Open Source software downloads

prepare-temp-type.cpp

Go to the documentation of this file.
00001 //
00002 // Copyright (C) 2004-2008 Maciej Sobczak, Stephen Hutton
00003 // Distributed under the Boost Software License, Version 1.0.
00004 // (See accompanying file LICENSE_1_0.txt or copy at
00005 // http://www.boost.org/LICENSE_1_0.txt)
00006 //
00007 
00008 #define SOCI_SOURCE
00009 #include "prepare-temp-type.h"
00010 #include "ref-counted-prepare-info.h"
00011 #include "session.h"
00012 
00013 using namespace soci;
00014 using namespace soci::details;
00015 
00016 prepare_temp_type::prepare_temp_type(session & s)
00017     : rcpi_(new ref_counted_prepare_info(s))
00018 {
00019     // this is the beginning of new query
00020     s.get_query_stream().str("");
00021 }
00022 
00023 prepare_temp_type::prepare_temp_type(prepare_temp_type const & o)
00024     :rcpi_(o.rcpi_)
00025 {
00026     rcpi_->inc_ref();
00027 }
00028 
00029 prepare_temp_type & prepare_temp_type::operator=(prepare_temp_type const & o)
00030 {
00031     o.rcpi_->inc_ref();
00032     rcpi_->dec_ref();
00033     rcpi_ = o.rcpi_;
00034 
00035     return *this;
00036 }
00037 
00038 prepare_temp_type::~prepare_temp_type()
00039 {
00040     rcpi_->dec_ref();
00041 }
00042 
00043 prepare_temp_type & prepare_temp_type::operator,(into_type_ptr const & i)
00044 {
00045     rcpi_->exchange(i);
00046     return *this;
00047 }
00048 
00049 prepare_temp_type & prepare_temp_type::operator,(use_type_ptr const & u)
00050 {
00051     rcpi_->exchange(u);
00052     return *this;
00053 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
SourceForge Logo

Generated on Sun Oct 3 2010 17:42:17 for EXTRAS-SOCI by Doxygen 1.7.1