Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

tablestream.hxx

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  *   FILE
00004  *      pqxx/tablestream.hxx
00005  *
00006  *   DESCRIPTION
00007  *      definition of the pqxx::tablestream class.
00008  *   pqxx::tablestream provides optimized batch access to a database table
00009  *   DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tablestream instead.
00010  *
00011  * Copyright (c) 2001-2003, Jeroen T. Vermeulen <jtv@xs4all.nl>
00012  *
00013  * See COPYING for copyright license.  If you did not receive a file called
00014  * COPYING with this source code, please notify the distributor of this mistake,
00015  * or contact the author.
00016  *
00017  *-------------------------------------------------------------------------
00018  */
00019 #include <string>
00020 
00021 #include "pqxx/libcompiler.h"
00022 
00023 /* Methods tested in eg. self-test program test1 are marked with "//[t1]"
00024  */
00025 
00026 
00027 namespace pqxx
00028 {
00029 
00030 // TODO: Non-blocking access to help hide network latencies
00031 
00032 class transaction_base;
00033 
00034 
00036 
00044 class PQXX_LIBEXPORT tablestream
00045 {
00046 public:
00047   tablestream(transaction_base &Trans, 
00048               const PGSTD::string &Name, 
00049               const PGSTD::string &Null=PGSTD::string());               //[t6]
00050   virtual ~tablestream() =0;                                            //[t6]
00051 
00052   const PGSTD::string &name() const { return m_Name; }                  //[t10]
00053 
00055 
00062   virtual void complete() =0;
00063 
00064 #ifdef PQXX_DEPRECATED_HEADERS
00065 
00066   PGSTD::string Name() const { return name(); }
00067 #endif
00068 
00069 protected:
00070   void register_me();
00071   transaction_base &Trans() const throw () { return m_Trans; }
00072   const PGSTD::string &NullStr() const { return m_Null; }
00073   void RegisterPendingError(const PGSTD::string &) throw ();
00074   bool is_finished() const throw () { return m_Finished; }
00075   void base_close();
00076 
00077 private:
00078   transaction_base &m_Trans;
00079   PGSTD::string m_Name;
00080   PGSTD::string m_Null;
00081   bool m_Finished;
00082 
00083   // Not allowed:
00084   tablestream();
00085   tablestream(const tablestream &);
00086   tablestream &operator=(const tablestream &);
00087 };
00088 
00089 }
00090 
00091 

Generated on Thu Dec 25 07:22:37 2003 for libpqxx by doxygen 1.3.4