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

gql++/driver-manager.h

Go to the documentation of this file.
00001 /* This is for emacs: -*-Mode: C++;-*- */
00002 #if !defined(__INC_DRIVER_MANAGER_H)
00003 #define __INC_DRIVER_MANAGER_H
00004 
00005 #include <string>
00006 #include <list>
00007 
00008 #include <uc++/plugin.h>
00009 
00010 #include "gql++/connection.h"
00011 #include "gql++/driver.h"
00012 
00013 namespace GQL
00014 {
00015 
00021 class DriverManager : public SigC::Object
00022 {
00023   public:
00024     DriverManager(uC::PluginManager *mgr = 0, const string& area = "gql");
00025 
00026     ~DriverManager();
00027     Connection *get_connection(const string &url,
00028                                const string &name = string(),
00029                                const string &passwd = string());
00030 
00031     bool register_driver(const string& id);
00032     void deregister_driver(const string& id);
00033     list<string> get_registered_drivers() const;
00034     const uC::PluginNode& get_drivers() const { return(drivers_); }
00035     Driver *get_driver(const string& id);
00036 
00037     static Driver *load_driver(const string& path, const string& id);
00038     bool is_auto_load() const { return(auto_load_); }
00039     void set_auto_load(bool do_auto) { auto_load_ = do_auto; }
00040 
00041     uC::PluginManager *plugin_manager() { return(pm_); }
00042   private:
00043     uC::PluginManager *pm_;
00044     uC::PluginNode drivers_;
00045     string area_name_;
00046     bool auto_load_;
00047 };
00048 
00049 }
00050 
00051 #endif

Generated on Fri Apr 19 05:23:53 2002 for gql by doxygen1.2.15