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 00066 explicit connection(const PGSTD::string &ConnInfo); //[t2] 00067 00069 00077 explicit connection(const char ConnInfo[]); //[t3] 00078 00079 virtual ~connection() throw (); 00080 00081 private: 00082 virtual void startconnect(); 00083 virtual void completeconnect(); 00084 }; 00085 00086 00088 00096 class PQXX_LIBEXPORT lazyconnection : public connection_base 00097 { 00098 public: 00100 lazyconnection(); //[t23] 00101 00103 00111 explicit lazyconnection(const PGSTD::string &ConnInfo); //[t21] 00112 00114 00123 explicit lazyconnection(const char ConnInfo[]); //[t22] 00124 00125 virtual ~lazyconnection() throw (); 00126 00127 private: 00128 virtual void startconnect() {} 00129 virtual void completeconnect(); 00130 }; 00131 00132 00134 class PQXX_LIBEXPORT asyncconnection : public connection_base 00135 { 00136 public: 00138 asyncconnection(); //[t63] 00139 00141 00149 explicit asyncconnection(const PGSTD::string &ConnInfo); //[t65] 00150 00152 00161 explicit asyncconnection(const char ConnInfo[]); //[t64] 00162 00163 virtual ~asyncconnection() throw (); 00164 00165 private: 00166 virtual void startconnect(); 00167 virtual void completeconnect(); 00168 virtual void dropconnect() throw () { m_connecting = false; } 00169 00171 bool m_connecting; 00172 }; 00173 00174 00176 00181 class PQXX_LIBEXPORT nullconnection : public connection_base 00182 { 00183 public: 00185 nullconnection() : connection_base("") {} //[t0] 00187 explicit nullconnection(const PGSTD::string &c) : //[t0] 00188 connection_base(c) {} 00190 explicit nullconnection(const char c[]) : //[t0] 00191 connection_base(c) {} 00192 00193 virtual ~nullconnection() throw (); 00194 00195 private: 00196 virtual void startconnect() {} 00197 virtual void completeconnect() {} 00198 virtual void dropconnect() throw () {} 00199 }; 00200 00201 } 00202 00203

Generated on Thu Aug 12 23:56:27 2004 for libpqxx by doxygen 1.3.8