hk_drivermanager Class Reference

Database Driver administration. More...

#include <hk_drivermanager.h>

Inheritance diagram for hk_drivermanager:

Inheritance graph
[legend]
Collaboration diagram for hk_drivermanager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 hk_drivermanager (void)
 hk_drivermanager (bool runtime)
hk_connectionnew_connection (const hk_string &drivername="", enum_interaction i=interactive)
hk_connectionfind_existing_connection (const hk_string &drivername, const hk_string &host, unsigned int tcp_port, const hk_string &user)
hk_databaseopen_connectionfile (const hk_url &connectionfile)

Static Public Member Functions

static vector< hk_string > * driverlist (void)
static void set_path (const hk_string &path)
static hk_string path (void)
static void set_driverselectdialog (requestdialogtype *dialog)
static hk_string show_driverselectdialog (void)

Friends

class hk_connection

Detailed Description

Database Driver administration.

Version:
Revision
1.23
Author:
Horst Knorr (hk_classes@knoda.org)
This class allows you to handle the database drivers. You can get a new connection to a database with new_connection.


Constructor & Destructor Documentation

hk_drivermanager::hk_drivermanager ( void   ) 

Parameters:
runtime if true the user has no possibility to change table and form structures or query statements


Member Function Documentation

hk_connection * hk_drivermanager::new_connection ( const hk_string &  drivername = "",
enum_interaction  i = interactive 
)

with this method you can create a new connection to a database. If no driver is set a dialog appears which asks for the driver. You can set a GUI dependend driverdialog with set_driverselectdialog.

Parameters:
drivername name of the wished database driver (i.e. mysql)
i if i is set to 'interactive' warningmessages and dialog boxes will be shown
Returns:
a driver specific version of hk_connection or NULL if no driver could be found.

hk_connection * hk_drivermanager::find_existing_connection ( const hk_string &  drivername,
const hk_string &  host,
unsigned int  tcp_port,
const hk_string &  user 
)

If an already created connection exists, it will be returned otherwise NULL

void hk_drivermanager::set_path ( const hk_string &  path  )  [static]

Path to the directory where the database drivers are stored.(default: /usr/lib/hk_classes/drivers)

void hk_drivermanager::set_driverselectdialog ( requestdialogtype *  dialog  )  [static]

you can write your own GUI dependend function to show a driver select dialog by defining a function of requestdialogtype


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 02:48:19 2006 for Databaseconnectionclasses by  doxygen 1.5.0