summaryrefslogtreecommitdiff
path: root/src/driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver.h')
-rw-r--r--src/driver.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/driver.h b/src/driver.h
index 10a6863bc..246180270 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -60,8 +60,9 @@ DECLARE_POSTFIX_INCREMENT(Driver::Type)
class DriverFactoryBase {
private:
Driver::Type type; ///< The type of driver.
+ int priority; ///< The priority of this factory.
const char *name; ///< The name of the drivers of this factory.
- int priority; ///< The priority of this factory.
+ const char *description; ///< The description of this driver.
typedef std::map<const char *, DriverFactoryBase *, StringCompare> Drivers; ///< Type for a map of drivers.
@@ -97,15 +98,11 @@ private:
}
protected:
- void RegisterDriver(const char *name, Driver::Type type, int priority);
-
-public:
- DriverFactoryBase() :
- name(NULL)
- {}
+ DriverFactoryBase(Driver::Type type, int priority, const char *name, const char *description);
virtual ~DriverFactoryBase();
+public:
/**
* Shuts down all active drivers
*/
@@ -124,13 +121,16 @@ public:
* Get a nice description of the driver-class.
* @return The description.
*/
- virtual const char *GetDescription() = 0;
+ const char *GetDescription() const
+ {
+ return this->description;
+ }
/**
* Create an instance of this driver-class.
* @return The instance.
*/
- virtual Driver *CreateInstance() = 0;
+ virtual Driver *CreateInstance() const = 0;
};
#endif /* DRIVER_H */