19 #ifndef PQXX_H_TABLEWRITER 
   20 #define PQXX_H_TABLEWRITER 
   21 #include "pqxx/compiler-public.hxx" 
   22 #include "pqxx/compiler-internal-pre.hxx" 
   23 #include "pqxx/tablestream" 
   36       const PGSTD::string &WName,
 
   37       const PGSTD::string &Null=PGSTD::string());
 
   39       const PGSTD::string &WName,
 
   43       const PGSTD::string &WName,
 
   46       const PGSTD::string &Null);
 
   48   template<typename IT> 
void insert(IT Begin, IT End);
 
   49   template<typename TUPLE> 
void insert(const TUPLE &);
 
   50   template<typename IT> 
void push_back(IT Begin, IT End);
 
   51   template<typename TUPLE> 
void push_back(const TUPLE &);
 
   55   template<
typename IT> PGSTD::string generate(IT Begin, IT End) 
const;
 
   56   template<
typename TUPLE> PGSTD::string generate(
const TUPLE &) 
const;
 
   57   virtual void complete();
 
   58   void write_raw_line(
const PGSTD::string &);
 
   61       const PGSTD::string &WName,
 
   62       const PGSTD::string &Columns = PGSTD::string());
 
   63   void PQXX_PRIVATE writer_close();
 
   69   class back_insert_iterator<pqxx::tablewriter> :
 
   70         public iterator<output_iterator_tag, void,void,void,void>
 
   75   back_insert_iterator &
 
   76     operator=(
const back_insert_iterator &rhs) 
throw ()
 
   78     m_Writer = rhs.m_Writer;
 
   81   template<
typename TUPLE>
 
   82   back_insert_iterator &operator=(
const TUPLE &T)
 
   97     const PGSTD::string &WName,
 
  100   namedclass(
"tablewriter", WName),
 
  103   setup(T, WName, 
columnlist(begincolumns, endcolumns));
 
  106     const PGSTD::string &WName,
 
  109     const PGSTD::string &Null) :
 
  110   namedclass(
"tablewriter", WName),
 
  113   setup(T, WName, 
columnlist(begincolumns, endcolumns));
 
  117 PGSTD::string PQXX_LIBEXPORT 
Escape(
 
  118         const PGSTD::string &s,
 
  119         const PGSTD::string &null);
 
  121         const PGSTD::string &s,
 
  122         const PGSTD::string &null)
 
  123 { 
return Escape(s, null); }
 
  126         const PGSTD::string &null)
 
  127 { 
return s ? 
Escape(PGSTD::string(s), null) : 
"\\N"; }
 
  130         const PGSTD::string &null)
 
  134   const PGSTD::string &m_null;
 
  136   explicit Escaper(
const PGSTD::string &null) : m_null(null) {}
 
  140 template<
typename IT>
 
  145 template<
typename TUPLE>
 
  148   return generate(T.begin(), T.end());
 
  156   insert(T.begin(), T.end());
 
  158 template<
typename IT>
 
  163 template<
typename TUPLE>
 
  166   insert(T.begin(), T.end());
 
  168 template<
typename TUPLE>
 
  175 #include "pqxx/compiler-internal-post.hxx"