pqxx::basic_connection< CONNECTPOLICY > Class Template Reference

The ultimate template that defines a connection type. More...

#include <basic_connection.hxx>

List of all members.

Public Member Functions

 basic_connection ()
 basic_connection (const PGSTD::string &opt)
 basic_connection (const char opt[])
 ~basic_connection () throw ()
const PGSTD::string & options () const throw ()


Detailed Description

template<typename CONNECTPOLICY>
class pqxx::basic_connection< CONNECTPOLICY >

The ultimate template that defines a connection type.

Combines connection_base (the highly complex class implementing essentially all connection-related functinality) with a connection policy (a simpler helper class determining the rules that govern the process of setting up the underlying connection to the backend).

The pattern used to combine these classes is the same as for basic_transaction. Through use of the template mechanism, the policy object is embedded in the basic_connection object so that it does not need to be allocated separately. At the same time this construct avoids the need for any virtual functions in this class, which reduces risks of bugs in construction and destruction; as well as any need to templatize the larger body of code in the connection_base class which might otherwise lead to unacceptable code duplication.


Constructor & Destructor Documentation

template<typename CONNECTPOLICY>
pqxx::basic_connection< CONNECTPOLICY >::basic_connection  ) 
 

template<typename CONNECTPOLICY>
pqxx::basic_connection< CONNECTPOLICY >::basic_connection const PGSTD::string &  opt  )  [explicit]
 

template<typename CONNECTPOLICY>
pqxx::basic_connection< CONNECTPOLICY >::basic_connection const char  opt[]  )  [explicit]
 

template<typename CONNECTPOLICY>
pqxx::basic_connection< CONNECTPOLICY >::~basic_connection  )  throw ()
 


Member Function Documentation

template<typename CONNECTPOLICY>
const PGSTD::string& pqxx::basic_connection< CONNECTPOLICY >::options  )  const throw ()
 


The documentation for this class was generated from the following file:
Generated on Sun Jun 18 15:06:42 2006 for libpqxx by  doxygen 1.4.6