blob: 86331f8c46d863702ee61c3dc279bf85d3ae3fd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#ifndef __SOUNDDriverFACTORY_H__
#define __SOUNDDriverFACTORY_H__
#include "Common.h"
#include "DriverFactory.h"
#include "SoundManager.h"
#include "MusicInterface.h"
namespace Sexy {
class SoundDriver: public Driver
{
public:
virtual SoundManager* Create (SexyAppBase * theApp) = 0;
virtual MusicInterface* CreateMusicInterface (SexyAppBase * theApp);
public:
SoundDriver (const std::string theName,
int thePriority = 0);
~SoundDriver ();
};
class SoundDriverFactory: public DriverFactory
{
public:
static SoundDriverFactory* GetSoundDriverFactory ();
private:
void Load();
private:
SoundDriverFactory ();
~SoundDriverFactory ();
};
class SoundDriverRegistor
{
public:
SoundDriverRegistor(SoundDriver * theDriver)
: mDriver (theDriver)
{
SoundDriverFactory* factory;
factory = SoundDriverFactory::GetSoundDriverFactory ();
factory->AddDriver (mDriver);
}
~SoundDriverRegistor()
{
SoundDriverFactory* factory;
factory = SoundDriverFactory::GetSoundDriverFactory ();
factory->RemoveDriver (mDriver);
}
private:
SoundDriver * mDriver;
};
}
#endif
|