Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

GQL::DriverManager Class Reference

The DriverManager class. More...

#include <driver-manager.h>

List of all members.

Public Member Functions

 DriverManager (Yehia::PluginManager &mgr=Yehia::PluginManager::instance(), const std::string &area="gql")
 Contructor.
 ~DriverManager ()
 Destructor.
Connectionget_connection (const std::string &url, const std::string &name=std::string(), const std::string &passwd=std::string())
 Try to open a connection.
bool register_driver (const std::string &id)
 Register a driver.
void deregister_driver (const std::string &id)
 Remove a driver.
std::list< std::string > get_registered_drivers () const
 Get a list of registered drivers.
const Yehia::PluginNodeget_drivers () const
 Get the parent node of the drivers.
Driverget_driver (const std::string &id)
bool is_auto_load () const
 Get autoload status.
void set_auto_load (bool do_auto)
 Set autoload status.
Yehia::PluginManagerplugin_manager ()
 Get underlying PluginManager object.


Detailed Description

The DriverManager class.

The DriverManager is responsible for opening connections and managing the drivers. It uses an uC::PluginManager object for the driver plugin management.


Constructor & Destructor Documentation

GQL::DriverManager::DriverManager Yehia::PluginManager mgr = Yehia::PluginManager::instance(),
const std::string &  area = "gql"
 

Contructor.

Parameters:
mgr PluginManager instance to use for handling of the driver plugins. If 0, PluginManager::instance() will be used.
area area of uCXX plugin namespace used. Don't specify a value unless you have installed the driver plugins in an unusual place.

GQL::DriverManager::~DriverManager  ) 
 

Destructor.


Member Function Documentation

void GQL::DriverManager::deregister_driver const std::string &  id  ) 
 

Remove a driver.

Parameters:
id Driver ID.
Exceptions:
SQLException driver id was not registered.

Connection* GQL::DriverManager::get_connection const std::string &  url,
const std::string &  name = std::string(),
const std::string &  passwd = std::string()
 

Try to open a connection.

If is_auto_load() is true, the right driver will be loaded and registered.

Parameters:
url GQL database URL
name Database username.
passwd Password.
Exceptions:
SQLException opening failed.
Returns:
Opened connection.

Driver* GQL::DriverManager::get_driver const std::string &  id  ) 
 

const Yehia::PluginNode& GQL::DriverManager::get_drivers  )  const [inline]
 

Get the parent node of the drivers.

Returns:
The Yehia::PluginNode which contains the driver plugins.

std::list<std::string> GQL::DriverManager::get_registered_drivers  )  const
 

Get a list of registered drivers.

Returns:
List of driver IDs.

bool GQL::DriverManager::is_auto_load  )  const [inline]
 

Get autoload status.

Returns:
true if drivers are autoloaded.

Yehia::PluginManager& GQL::DriverManager::plugin_manager  )  [inline]
 

Get underlying PluginManager object.

Returns:
The PluginManager object that does the real work.

bool GQL::DriverManager::register_driver const std::string &  id  ) 
 

Register a driver.

Parameters:
id Driver ID. If the driver is not already registered, attempt to load it.
Returns:
true if the driver is now registered.

void GQL::DriverManager::set_auto_load bool  do_auto  )  [inline]
 

Set autoload status.

Parameters:
do_auto Wether to autoload drivers.


The documentation for this class was generated from the following file:
Generated on Tue Oct 19 13:35:48 2004 for gql by  doxygen 1.3.9.1