Commit eed9d9d1 authored by msobczak's avatar msobczak

Style

parent 0e786463
......@@ -22,8 +22,8 @@ template <>
class into_type<blob> : public standard_into_type
{
public:
into_type(blob &b) : standard_into_type(&b, eXBLOB) {}
into_type(blob &b, eIndicator &ind)
into_type(blob & b) : standard_into_type(&b, eXBLOB) {}
into_type(blob & b, eIndicator & ind)
: standard_into_type(&b, eXBLOB, ind) {}
};
......@@ -31,15 +31,15 @@ template <>
class use_type<blob> : public standard_use_type
{
public:
use_type(blob &b, std::string const &name = std::string())
use_type(blob & b, std::string const & name = std::string())
: standard_use_type(&b, eXBLOB, false, name) {}
use_type(const blob &b, std::string const &name = std::string())
use_type(blob const & b, std::string const & name = std::string())
: standard_use_type(const_cast<blob *>(&b), eXBLOB, true, name) {}
use_type(blob &b, eIndicator &ind,
std::string const &name = std::string())
use_type(blob & b, eIndicator & ind,
std::string const & name = std::string())
: standard_use_type(&b, eXBLOB, ind, false, name) {}
use_type(const blob &b, eIndicator &ind,
std::string const &name = std::string())
use_type(blob const & b, eIndicator & ind,
std::string const & name = std::string())
: standard_use_type(const_cast<blob *>(&b), eXBLOB, ind, true, name) {}
};
......
......@@ -13,7 +13,7 @@
using namespace soci;
blob::blob(session &s)
blob::blob(session & s)
{
backEnd_ = s.make_blob_backend();
}
......@@ -34,12 +34,12 @@ std::size_t blob::read(std::size_t offset, char *buf, std::size_t toRead)
}
std::size_t blob::write(
std::size_t offset, char const *buf, std::size_t toWrite)
std::size_t offset, char const * buf, std::size_t toWrite)
{
return backEnd_->write(offset, buf, toWrite);
}
std::size_t blob::append(char const *buf, std::size_t toWrite)
std::size_t blob::append(char const * buf, std::size_t toWrite)
{
return backEnd_->append(buf, toWrite);
}
......
......@@ -26,20 +26,20 @@ class blob_backend;
class SOCI_DECL blob
{
public:
blob(session &s);
blob(session & s);
~blob();
std::size_t get_len();
std::size_t read(std::size_t offset, char *buf, std::size_t toRead);
std::size_t write(std::size_t offset, char const *buf,
std::size_t read(std::size_t offset, char * buf, std::size_t toRead);
std::size_t write(std::size_t offset, char const * buf,
std::size_t toWrite);
std::size_t append(char const *buf, std::size_t toWrite);
std::size_t append(char const * buf, std::size_t toWrite);
void trim(std::size_t newLen);
details::blob_backend * get_backend() { return backEnd_; }
private:
details::blob_backend *backEnd_;
details::blob_backend * backEnd_;
};
} // namespace soci
......
......@@ -23,15 +23,15 @@ struct type_conversion<boost::fusion::vector<T0> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::fusion::vector<T0> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::fusion::vector<T0> & out)
{
in
>> boost::fusion::at_c<0>(out);
}
static void to_base(boost::fusion::vector<T0> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::fusion::vector<T0> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::fusion::at_c<0>(in);
......@@ -43,16 +43,16 @@ struct type_conversion<boost::fusion::vector<T0, T1> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::fusion::vector<T0, T1> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::fusion::vector<T0, T1> & out)
{
in
>> boost::fusion::at_c<0>(out)
>> boost::fusion::at_c<1>(out);
}
static void to_base(boost::fusion::vector<T0, T1> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::fusion::vector<T0, T1> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::fusion::at_c<0>(in)
......@@ -65,8 +65,8 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::fusion::vector<T0, T1, T2> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::fusion::vector<T0, T1, T2> & out)
{
in
>> boost::fusion::at_c<0>(out)
......@@ -74,8 +74,8 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2> >
>> boost::fusion::at_c<2>(out);
}
static void to_base(boost::fusion::vector<T0, T1, T2> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::fusion::vector<T0, T1, T2> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::fusion::at_c<0>(in)
......@@ -89,8 +89,8 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3> & out)
{
in
>> boost::fusion::at_c<0>(out)
......@@ -99,8 +99,8 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3> >
>> boost::fusion::at_c<3>(out);
}
static void to_base(boost::fusion::vector<T0, T1, T2, T3> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::fusion::vector<T0, T1, T2, T3> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::fusion::at_c<0>(in)
......@@ -115,8 +115,8 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3, T4> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3, T4> & out)
{
in
>> boost::fusion::at_c<0>(out)
......@@ -126,8 +126,8 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4> >
>> boost::fusion::at_c<4>(out);
}
static void to_base(boost::fusion::vector<T0, T1, T2, T3, T4> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::fusion::vector<T0, T1, T2, T3, T4> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::fusion::at_c<0>(in)
......@@ -144,8 +144,8 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4, T5> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3, T4, T5> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3, T4, T5> & out)
{
in
>> boost::fusion::at_c<0>(out)
......@@ -156,8 +156,8 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4, T5> >
>> boost::fusion::at_c<5>(out);
}
static void to_base(boost::fusion::vector<T0, T1, T2, T3, T4, T5> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::fusion::vector<T0, T1, T2, T3, T4, T5> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::fusion::at_c<0>(in)
......@@ -175,8 +175,8 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6> & out)
{
in
>> boost::fusion::at_c<0>(out)
......@@ -188,8 +188,8 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6> >
>> boost::fusion::at_c<6>(out);
}
static void to_base(boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::fusion::at_c<0>(in)
......@@ -208,8 +208,8 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7> & out)
{
in
>> boost::fusion::at_c<0>(out)
......@@ -222,8 +222,9 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7> >
>> boost::fusion::at_c<7>(out);
}
static void to_base(boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7> &in,
base_type &out, eIndicator &ind)
static void to_base(
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::fusion::at_c<0>(in)
......@@ -239,12 +240,13 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7> >
template <typename T0, typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8>
struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8> >
struct type_conversion<
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8> & out)
{
in
>> boost::fusion::at_c<0>(out)
......@@ -258,8 +260,9 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8>
>> boost::fusion::at_c<8>(out);
}
static void to_base(boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8> &in,
base_type &out, eIndicator &ind)
static void to_base(
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::fusion::at_c<0>(in)
......@@ -276,12 +279,13 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8>
template <typename T0, typename T1, typename T2, typename T3, typename T4,
typename T5, typename T6, typename T7, typename T8, typename T9>
struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
struct type_conversion<
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> & out)
{
in
>> boost::fusion::at_c<0>(out)
......@@ -296,8 +300,9 @@ struct type_conversion<boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8,
>> boost::fusion::at_c<9>(out);
}
static void to_base(boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> &in,
base_type &out, eIndicator &ind)
static void to_base(
boost::fusion::vector<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::fusion::at_c<0>(in)
......
......@@ -21,15 +21,15 @@ struct type_conversion<boost::tuple<T0> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::tuple<T0> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::tuple<T0> & out)
{
in
>> boost::tuples::get<0>(out);
}
static void to_base(boost::tuple<T0> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::tuple<T0> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::tuples::get<0>(in);
......@@ -41,16 +41,16 @@ struct type_conversion<boost::tuple<T0, T1> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::tuple<T0, T1> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::tuple<T0, T1> & out)
{
in
>> boost::tuples::get<0>(out)
>> boost::tuples::get<1>(out);
}
static void to_base(boost::tuple<T0, T1> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::tuple<T0, T1> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::tuples::get<0>(in)
......@@ -63,8 +63,8 @@ struct type_conversion<boost::tuple<T0, T1, T2> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::tuple<T0, T1, T2> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::tuple<T0, T1, T2> & out)
{
in
>> boost::tuples::get<0>(out)
......@@ -72,8 +72,8 @@ struct type_conversion<boost::tuple<T0, T1, T2> >
>> boost::tuples::get<2>(out);
}
static void to_base(boost::tuple<T0, T1, T2> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::tuple<T0, T1, T2> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::tuples::get<0>(in)
......@@ -87,8 +87,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::tuple<T0, T1, T2, T3> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::tuple<T0, T1, T2, T3> & out)
{
in
>> boost::tuples::get<0>(out)
......@@ -97,8 +97,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3> >
>> boost::tuples::get<3>(out);
}
static void to_base(boost::tuple<T0, T1, T2, T3> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::tuple<T0, T1, T2, T3> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::tuples::get<0>(in)
......@@ -113,8 +113,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::tuple<T0, T1, T2, T3, T4> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::tuple<T0, T1, T2, T3, T4> & out)
{
in
>> boost::tuples::get<0>(out)
......@@ -124,8 +124,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4> >
>> boost::tuples::get<4>(out);
}
static void to_base(boost::tuple<T0, T1, T2, T3, T4> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::tuple<T0, T1, T2, T3, T4> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::tuples::get<0>(in)
......@@ -142,8 +142,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4, T5> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::tuple<T0, T1, T2, T3, T4, T5> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::tuple<T0, T1, T2, T3, T4, T5> & out)
{
in
>> boost::tuples::get<0>(out)
......@@ -154,8 +154,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4, T5> >
>> boost::tuples::get<5>(out);
}
static void to_base(boost::tuple<T0, T1, T2, T3, T4, T5> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::tuple<T0, T1, T2, T3, T4, T5> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::tuples::get<0>(in)
......@@ -173,8 +173,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4, T5, T6> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::tuple<T0, T1, T2, T3, T4, T5, T6> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::tuple<T0, T1, T2, T3, T4, T5, T6> & out)
{
in
>> boost::tuples::get<0>(out)
......@@ -186,8 +186,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4, T5, T6> >
>> boost::tuples::get<6>(out);
}
static void to_base(boost::tuple<T0, T1, T2, T3, T4, T5, T6> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::tuple<T0, T1, T2, T3, T4, T5, T6> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::tuples::get<0>(in)
......@@ -206,8 +206,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7> & out)
{
in
>> boost::tuples::get<0>(out)
......@@ -220,8 +220,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7> >
>> boost::tuples::get<7>(out);
}
static void to_base(boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::tuples::get<0>(in)
......@@ -241,8 +241,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8> & out)
{
in
>> boost::tuples::get<0>(out)
......@@ -256,8 +256,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8> >
>> boost::tuples::get<8>(out);
}
static void to_base(boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8> &in,
base_type &out, eIndicator &ind)
static void to_base(boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::tuples::get<0>(in)
......@@ -278,8 +278,8 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
{
typedef values base_type;
static void from_base(base_type const &in, eIndicator ind,
boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> &out)
static void from_base(base_type const & in, eIndicator ind,
boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> & out)
{
in
>> boost::tuples::get<0>(out)
......@@ -294,8 +294,9 @@ struct type_conversion<boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
>> boost::tuples::get<9>(out);
}
static void to_base(boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> &in,
base_type &out, eIndicator &ind)
static void to_base(
boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> & in,
base_type & out, eIndicator & ind)
{
out
<< boost::tuples::get<0>(in)
......
......@@ -88,7 +88,7 @@ std::size_t connection_pool::lease()
std::size_t pos;
// no timeout
bool success = try_lease(pos, -1);
bool const success = try_lease(pos, -1);
assert(success);
return pos;
......
......@@ -17,7 +17,7 @@ standard_into_type::~standard_into_type()
delete backEnd_;
}
void standard_into_type::define(statement_impl &st, int &position)
void standard_into_type::define(statement_impl & st, int & position)
{
backEnd_ = st.make_into_type_backend();
backEnd_->define_by_pos(position, data_, type_);
......@@ -52,7 +52,7 @@ vector_into_type::~vector_into_type()
delete backEnd_;
}
void vector_into_type::define(statement_impl &st, int &position)
void vector_into_type::define(statement_impl & st, int & position)
{
backEnd_ = st.make_vector_into_type_backend();
backEnd_->define_by_pos(position, data_, type_);
......
......@@ -35,7 +35,7 @@ class into_type_base
public:
virtual ~into_type_base() {}
virtual void define(statement_impl &st, int &position) = 0;
virtual void define(statement_impl & st, int & position) = 0;
virtual void pre_fetch() = 0;
virtual void post_fetch(bool gotData, bool calledFromFetch) = 0;
virtual void clean_up() = 0;
......@@ -51,9 +51,9 @@ typedef type_ptr<into_type_base> into_type_ptr;
class SOCI_DECL standard_into_type : public into_type_base
{
public:
standard_into_type(void *data, eExchangeType type)
standard_into_type(void * data, eExchangeType type)
: data_(data), type_(type), ind_(NULL), backEnd_(NULL) {}
standard_into_type(void *data, eExchangeType type, eIndicator& ind)
standard_into_type(void * data, eExchangeType type, eIndicator & ind)
: data_(data), type_(type), ind_(&ind), backEnd_(NULL) {}
virtual ~standard_into_type();
......@@ -62,7 +62,7 @@ protected:
virtual void post_fetch(bool gotData, bool calledFromFetch);
private:
virtual void define(statement_impl &st, int &position);
virtual void define(statement_impl & st, int & position);
virtual void pre_fetch();
virtual void clean_up();
......@@ -71,22 +71,22 @@ private:
// conversion hook (from base type to arbitrary user type)
virtual void convert_from_base() {}
void *data_;
void * data_;
eExchangeType type_;
eIndicator *ind_;
eIndicator * ind_;
standard_into_type_backend *backEnd_;
standard_into_type_backend * backEnd_;
};
// into type base class for vectors
class SOCI_DECL vector_into_type : public into_type_base
{
public:
vector_into_type(void *data, eExchangeType type)
vector_into_type(void * data, eExchangeType type)
: data_(data), type_(type), indVec_(NULL), backEnd_(NULL) {}
vector_into_type(void *data, eExchangeType type,
std::vector<eIndicator> &ind)
vector_into_type(void * data, eExchangeType type,
std::vector<eIndicator> & ind)
: data_(data), type_(type), indVec_(&ind), backEnd_(NULL) {}
~vector_into_type();
......@@ -95,17 +95,17 @@ protected:
virtual void post_fetch(bool gotData, bool calledFromFetch);
private:
virtual void define(statement_impl &st, int &position);
virtual void define(statement_impl & st, int & position);
virtual void pre_fetch();
virtual void clean_up();
virtual void resize(std::size_t sz);
virtual std::size_t size() const;
void *data_;
void * data_;
eExchangeType type_;
std::vector<eIndicator> *indVec_;
std::vector<eIndicator> * indVec_;
vector_into_type_backend *backEnd_;
vector_into_type_backend * backEnd_;
virtual void convert_from_base() {}
};
......@@ -117,10 +117,10 @@ template <typename T>
class into_type : public standard_into_type
{
public:
into_type(T &t)
into_type(T & t)
: standard_into_type(&t,
static_cast<eExchangeType>(exchange_traits<T>::eXType)) {}
into_type(T &t, eIndicator &ind)
into_type(T & t, eIndicator & ind)
: standard_into_type(&t,
static_cast<eExchangeType>(exchange_traits<T>::eXType), ind) {}
};
......@@ -129,10 +129,10 @@ template <typename T>
class into_type<std::vector<T> > : public vector_into_type
{
public:
into_type(std::vector<T> &v)
into_type(std::vector<T> & v)
: vector_into_type(&v,
static_cast<eExchangeType>(exchange_traits<T>::eXType)) {}
into_type(std::vector<T> &v, std::vector<eIndicator> &ind)
into_type(std::vector<T> & v, std::vector<eIndicator> & ind)
: vector_into_type(&v,
static_cast<eExchangeType>(exchange_traits<T>::eXType), ind) {}
};
......@@ -140,12 +140,12 @@ public:
// special cases for char* and char[]
template <>
class into_type<char*> : public standard_into_type
class into_type<char *> : public standard_into_type
{
public:
into_type(char *str, std::size_t bufSize)
into_type(char * str, std::size_t bufSize)
: standard_into_type(&str_, eXCString), str_(str, bufSize) {}
into_type(char *str, eIndicator &ind, std::size_t bufSize)
into_type(char * str, eIndicator & ind, std::size_t bufSize)
: standard_into_type(&str_, eXCString, ind), str_(str, bufSize) {}
private:
......@@ -153,30 +153,30 @@ private:
};
template <std::size_t N>
class into_type<char[N]> : public into_type<char*>
class into_type<char[N]> : public into_type<char *>
{
public:
into_type(char str[]) : into_type<char*>(str, N) {}
into_type(char str[], eIndicator &ind)
: into_type<char*>(str, ind, N) {}
into_type(char str[]) : into_type<char *>(str, N) {}
into_type(char str[], eIndicator & ind)
: into_type<char *>(str, ind, N) {}
};
// helper dispatchers for basic types
template <typename T>
into_type_ptr do_into(T &t, basic_type_tag)
into_type_ptr do_into(T & t, basic_type_tag)
{
return into_type_ptr(new into_type<T>(t));
}
template <typename T>
into_type_ptr do_into(T &t, eIndicator &indicator