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

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  * See COPYING for copyright license.  If you did not receive a file called
00013  * COPYING with this source code, please notify the distributor of this mistake,
00014  * or contact the author.
00015  *
00016  *-------------------------------------------------------------------------
00017  */
00018 #ifndef PQXX_TABLESTREAM_H
00019 #define PQXX_TABLESTREAM_H
00020 
00021 #include <string>
00022 
00023 #include "pqxx/compiler.h"
00024 
00025 /* Methods tested in eg. self-test program test1 are marked with "//[t1]"
00026  */
00027 
00028 
00029 namespace pqxx
00030 {
00031 
00032 // TODO: Non-blocking access to help hide network latencies
00033 
00034 class transaction_base;
00035 
00036 
00038 
00046 class PQXX_LIBEXPORT tablestream
00047 {
00048 public:
00049   tablestream(transaction_base &Trans, 
00050               const PGSTD::string &Name, 
00051               const PGSTD::string &Null=PGSTD::string());                       //[t6]
00052   virtual ~tablestream() =0;                                            //[t6]
00053 
00054   PGSTD::string Name() const { return m_Name; }                         //[t10]
00055 
00056 protected:
00057   transaction_base &Trans() const throw () { return m_Trans; }
00058   PGSTD::string NullStr() const { return m_Null; }
00059 
00060 private:
00061   transaction_base &m_Trans;
00062   PGSTD::string m_Name;
00063   PGSTD::string m_Null;
00064 
00065   // Not allowed:
00066   tablestream();
00067   tablestream(const tablestream &);
00068   tablestream &operator=(const tablestream &);
00069 };
00070 
00072 typedef tablestream TableStream;
00073 
00074 }
00075 
00076 #endif
00077 

Generated on Sat Jun 7 00:49:34 2003 for libpqxx by doxygen1.3-rc3