19 #ifndef PQXX_H_TABLEREADER
20 #define PQXX_H_TABLEREADER
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
25 #include "pqxx/result"
26 #include "pqxx/tablestream"
53 const PGSTD::string &Name,
54 const PGSTD::string &Null=PGSTD::string());
59 template<
typename ITER>
61 const PGSTD::string &Name,
66 const PGSTD::string &Name,
69 const PGSTD::string &Null);
73 template<
typename TUPLE>
tablereader &operator>>(TUPLE &);
75 operator bool()
const throw () {
return !m_Done; }
83 bool get_raw_line(PGSTD::string &Line);
85 template<
typename TUPLE>
86 void tokenize(PGSTD::string, TUPLE &)
const;
96 virtual void complete();
100 const PGSTD::string &RName,
101 const PGSTD::string &Columns=PGSTD::string());
102 void PQXX_PRIVATE reader_close();
103 PGSTD::string extract_field(
const PGSTD::string &,
104 PGSTD::string::size_type &)
const;
113 template<
typename ITER>
inline
115 const PGSTD::string &Name,
118 namedclass(Name,
"tablereader"),
122 setup(T, Name,
columnlist(begincolumns, endcolumns));
125 template<
typename ITER>
inline
127 const PGSTD::string &Name,
130 const PGSTD::string &Null) :
131 namedclass(Name,
"tablereader"),
135 setup(T, Name,
columnlist(begincolumns, endcolumns));
139 template<
typename TUPLE>
142 PGSTD::back_insert_iterator<TUPLE> ins = PGSTD::back_inserter(T);
145 PGSTD::string::size_type here=0;
146 while (here < Line.size()) *ins++ = extract_field(Line, here);
150 template<
typename TUPLE>
154 if (get_raw_line(Line)) tokenize(Line, T);
161 #include "pqxx/compiler-internal-post.hxx"