Public Member Functions | |
| virtual | ~DriverFactoryBase () |
| Frees memory used for this->name. | |
| virtual const char * | GetDescription ()=0 |
| Get a nice description of the driver-class. | |
| virtual Driver * | CreateInstance ()=0 |
| Create an instance of this driver-class. | |
Static Public Member Functions | |
| static void | ShutdownDrivers () |
| Shuts down all active drivers. | |
| static Driver * | SelectDriver (const char *name, Driver::Type type) |
| Find the requested driver and return its class. | |
| static char * | GetDriversInfo (char *p, const char *last) |
| Build a human readable list of available drivers, grouped by type. | |
Protected Member Functions | |
| void | RegisterDriver (const char *name, Driver::Type type, int priority) |
| Register a driver internally, based on its name. | |
Private Types | |
|
typedef std::map< const char *, DriverFactoryBase *, StringCompare > | Drivers |
Static Private Member Functions | |
| static Drivers & | GetDrivers () |
| static Driver ** | GetActiveDriver (Driver::Type type) |
| static const char * | GetDriverTypeName (Driver::Type type) |
Private Attributes | |
| Driver::Type | type |
| const char * | name |
| int | priority |
Definition at line 46 of file driver.h.
| void DriverFactoryBase::RegisterDriver | ( | const char * | name, | |
| Driver::Type | type, | |||
| int | priority | |||
| ) | [protected] |
Register a driver internally, based on its name.
| name | the name of the driver. | |
| type | the type of driver to register | |
| priority | the priority; how badly do we want this as default? |
Definition at line 153 of file driver.cpp.
| Driver * DriverFactoryBase::SelectDriver | ( | const char * | name, | |
| Driver::Type | type | |||
| ) | [static] |
Find the requested driver and return its class.
| name | the driver to select. | |
| type | the type of driver to select |
Definition at line 68 of file driver.cpp.
References CreateInstance(), lastof, lengthof, strecpy(), StrEmpty(), and usererror().
1.6.1