Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

tablestream.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  *   FILE
00004  *      pqxx/tablestream.h
00005  *
00006  *   DESCRIPTION
00007  *      definition of the pqxx::TableStream class.
00008  *   pqxx::TableStream provides optimized batch access to a database table
00009  *
00010  * Copyright (c) 2001-2003, Jeroen T. Vermeulen <jtv@xs4all.nl>
00011  *
00012  *-------------------------------------------------------------------------
00013  */
00014 #ifndef PQXX_TABLESTREAM_H
00015 #define PQXX_TABLESTREAM_H
00016 
00017 #include <string>
00018 
00019 #include "pqxx/compiler.h"
00020 
00021 /* Methods tested in eg. self-test program test1 are marked with "//[t1]"
00022  */
00023 
00024 
00025 namespace pqxx
00026 {
00027 
00028 // TODO: Non-blocking access to help hide network latencies
00029 
00030 class TransactionItf;
00031 
00032 
00034 
00042 class PQXX_LIBEXPORT TableStream
00043 {
00044 public:
00045   TableStream(TransactionItf &Trans, 
00046               const PGSTD::string &Name, 
00047               const PGSTD::string &Null=PGSTD::string());                       //[t6]
00048   virtual ~TableStream() =0;                                            //[t6]
00049 
00050   PGSTD::string Name() const { return m_Name; }                         //[t10]
00051 
00052 protected:
00053   TransactionItf &Trans() const throw () { return m_Trans; }
00054   PGSTD::string NullStr() const { return m_Null; }
00055 
00056 private:
00057   TransactionItf &m_Trans;
00058   PGSTD::string m_Name;
00059   PGSTD::string m_Null;
00060 
00061   // Not allowed:
00062   TableStream();
00063   TableStream(const TableStream &);
00064   TableStream &operator=(const TableStream &);
00065 };
00066 
00067 
00068 }
00069 
00070 #endif
00071 

Generated on Mon Mar 31 11:29:45 2003 for libpqxx by doxygen1.3-rc3