From 5e85e8c5e03105e43cf9f2216e993c0596d7dfec Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 5 Jul 2007 12:23:54 +0000 Subject: (svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model. --- src/sound/sound_driver.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/sound/sound_driver.hpp (limited to 'src/sound/sound_driver.hpp') diff --git a/src/sound/sound_driver.hpp b/src/sound/sound_driver.hpp new file mode 100644 index 000000000..de1a19ac8 --- /dev/null +++ b/src/sound/sound_driver.hpp @@ -0,0 +1,27 @@ +/* $Id$ */ + +#ifndef SOUND_SOUND_DRIVER_HPP +#define SOUND_SOUND_DRIVER_HPP + +#include "../driver.h" + +class SoundDriver: public Driver { +}; + +class SoundDriverFactoryBase: public DriverFactoryBase { +}; + +template +class SoundDriverFactory: public SoundDriverFactoryBase { +public: + SoundDriverFactory() { this->RegisterDriver(((T *)this)->GetName(), Driver::DT_SOUND); } + + /** + * Get the long, human readable, name for the Driver-class. + */ + const char *GetName(); +}; + +extern SoundDriver *_sound_driver; + +#endif /* SOUND_SOUND_DRIVER_HPP */ -- cgit v1.2.3-54-g00ecf