Main Page   Class Hierarchy   Compound List   File List   Compound Members  

TDBConnectionManager.hh

00001 #ifndef _T_DB_CONNECTION_MANAGER_HH
00002 #define _T_DB_CONNECTION_MANAGER_HH
00003 
00004 #include "TString.hh"
00005 #include "TDBConnection.hh"
00006 
00007 
00017 class TDBConnectionManager
00018 {
00019 public:
00020   
00024   static void SetLogin (TString username,
00025                         TString password,
00026                         TString database,
00027                         TString host,
00028                         TString port);
00029   
00037   static TDBConnection* Connection (int index = 0);
00038   
00043   static void Close ();
00044   
00045   
00046 private:
00047   
00048   /* This is an all static class. */
00049   TDBConnectionManager () {}
00050   ~TDBConnectionManager () {}
00051   
00052   /* Database login information. */
00053   static TString myUsername;
00054   static TString myPassword;
00055   static TString myDatabase;
00056   static TString myHost;
00057   static TString myPort;
00058   
00059   /* Default connection. */
00060   static TDBConnection *myConn;
00061 };
00062 
00063 #endif // _T_DB_CONNECTION_MANAGER_HH

Generated on Sat Feb 15 18:37:16 2003 for Tools by doxygen1.3-rc2