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

connection.hxx

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  *   FILE
00004  *      pqxx/connection.hxx
00005  *
00006  *   DESCRIPTION
00007  *      definition of the pqxx::connection and pqxx::lazyconnection classes.
00008  *   Different ways of setting up a backend connection.  
00009  *   DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection instead.
00010  *
00011  * Copyright (c) 2001-2004, 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 "pqxx/connection_base"
00020 
00021 
00022 /* Methods tested in eg. self-test program test001 are marked with "//[t1]"
00023  */
00024 
00025 namespace pqxx
00026 {
00027 
00029 
00045 class PQXX_LIBEXPORT connection : public connection_base
00046 {
00047 public:
00049 
00053   connection();                                                         //[t1]
00054 
00056 
00061   explicit connection(const PGSTD::string &ConnInfo);                   //[t2]
00062 
00064 
00068   explicit connection(const char ConnInfo[]);                           //[t3]
00069 
00070   virtual ~connection() throw ();
00071 
00072 private:
00073   virtual void startconnect();
00074   virtual void completeconnect();
00075 };
00076 
00077 
00079 
00087 class PQXX_LIBEXPORT lazyconnection : public connection_base
00088 {
00089 public:
00091   lazyconnection();                                                     //[t23]
00092 
00094 
00097   explicit lazyconnection(const PGSTD::string &ConnInfo);               //[t21]
00098 
00100 
00104   explicit lazyconnection(const char ConnInfo[]);                       //[t22]
00105 
00106   virtual ~lazyconnection() throw ();
00107 
00108 private:
00109   virtual void startconnect() {}
00110   virtual void completeconnect();
00111 };
00112 
00113 
00115 class PQXX_LIBEXPORT asyncconnection : public connection_base
00116 {
00117 public:
00118   asyncconnection();                                                    //[t63]
00119   explicit asyncconnection(const PGSTD::string &ConnInfo);              //[t65]
00120   explicit asyncconnection(const char ConnInfo[]);                      //[t64]
00121   virtual ~asyncconnection() throw ();
00122 
00123 private:
00124   virtual void startconnect();
00125   virtual void completeconnect();
00126   virtual void dropconnect() { m_connecting = false; }
00127 
00129   bool m_connecting;
00130 };
00131 
00132 }
00133 
00134 

Generated on Thu Feb 19 22:04:35 2004 for libpqxx by doxygen 1.3.5