diff --git a/src/driver.h b/src/driver.h --- 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 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 */