Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
DtDatabaseDriverFactory Class Reference

A Static interface for creating Database drivers. More...

+ Collaboration diagram for DtDatabaseDriverFactory:

List of all members.

Public Member Functions

 ~DtDatabaseDriverFactory ()
 DTOR.

Static Public Member Functions

static std::vector< DtStringgetInstalledDrivers ()
 Attempt to get all installed drivers.
static const DtDatabaseDrivergetDriver (const DtString &driverName)
 Get a particular database driver.
static void registerDriver (DtDatabaseDriver *driver)
 Register a driver, If a driver with the same name exists this function will fail and throw an exception.
static void replaceDriver (DtDatabaseDriver *driver)
 Register a driver, If a driver with the same name exists, the original driver is destroyed and the new driver takes it's place.
static std::vector< DtStringgetDataSources (const DtString &driver)
 Attempt to get all known data sources.

Protected Types

typedef std::map< DtString,
DtDatabaseDriver * > 
DriverMap

Protected Member Functions

 DtDatabaseDriverFactory ()
 Protected CTOR since users do not create a Driver Factory.
DtDatabaseDriverlookupDriverByName (const DtString &driverName)
 Lookup a driver by name.
bool registerDriver (DtDatabaseDriver *driver, bool allowReplace)
 Protected function for registering a driver.

Static Protected Member Functions

static DtDatabaseDriverFactoryacquire ()
 Acquire a factory.
static void release ()
 Release a factory.

Protected Attributes

DriverMap myDriverMap

Static Protected Attributes

static DtMutex theFactoryMutex
static DtDatabaseDriverFactory theDriverFactory

Private Member Functions

 DtDatabaseDriverFactory (const DtDatabaseDriverFactory &)
DtDatabaseDriverFactoryoperator= (const DtDatabaseDriverFactory &)

Detailed Description

A Static interface for creating Database drivers.


Member Function Documentation

static const DtDatabaseDriver* DtDatabaseDriverFactory::getDriver ( const DtString driverName) [static]

Get a particular database driver.

If the driver is not found. a null pointer is returned.

static void DtDatabaseDriverFactory::registerDriver ( DtDatabaseDriver driver) [static]

Register a driver, If a driver with the same name exists this function will fail and throw an exception.

Exceptions:
DtInvalidInputif a driver with the same name exists or if the driver is null.
bool DtDatabaseDriverFactory::registerDriver ( DtDatabaseDriver driver,
bool  allowReplace 
) [protected]

Protected function for registering a driver.

Returns:
true is driver was registered, false if it was not.
static void DtDatabaseDriverFactory::replaceDriver ( DtDatabaseDriver driver) [static]

Register a driver, If a driver with the same name exists, the original driver is destroyed and the new driver takes it's place.

Exceptions:
DtInvalidInputif the driver is null.

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)