Cafu Engine
SoundShaderManagerImpl.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_SOUNDSYS_SOUND_SHADER_MANAGER_IMPLEMENTATION_HPP_INCLUDED
8 #define CAFU_SOUNDSYS_SOUND_SHADER_MANAGER_IMPLEMENTATION_HPP_INCLUDED
9 
10 #include "SoundShaderManager.hpp"
11 
12 #include <map>
13 
14 
15 class SoundShaderT;
16 
17 
18 /// Standard implementation of the sound shader manager.
20 {
21  public:
22 
23  /// Constructor.
25 
26  /// Destructor.
28 
29 
30  /// SoundShaderManagerI Implementation.
31  ArrayT<const SoundShaderT*> RegisterSoundShaderScript(const std::string& ScriptFile, const std::string& ModDir);
32  ArrayT<const SoundShaderT*> RegisterSoundShaderScriptsInDir(const std::string& Directory, const std::string& ModDir, bool Recurse=true);
33 
34  const SoundShaderT* GetSoundShader(const std::string& Name);
35 
36 
37  private:
38 
39  SoundShaderManagerImplT(const SoundShaderManagerImplT&); // Use of the Copy Constructor is not allowed.
40  void operator = (const SoundShaderManagerImplT&); // Use of the Assignment Operator is not allowed.
41 
42  ArrayT<std::string> m_SoundShaderScriptFiles; ///< Contains the names of all sound shader script files that have already been registered.
43  std::map<std::string, SoundShaderT*> m_SoundShaders; ///< Map of all registered sound shaders.
44 };
45 
46 #endif
ArrayT< const SoundShaderT * > RegisterSoundShaderScriptsInDir(const std::string &Directory, const std::string &ModDir, bool Recurse=true)
Registers all ".caud" files inside a directory.
Definition: SoundShaderManagerImpl.cpp:89
SoundShaderManagerImplT()
Constructor.
Definition: SoundShaderManagerImpl.cpp:28
Standard implementation of the sound shader manager.
Definition: SoundShaderManagerImpl.hpp:19
const SoundShaderT * GetSoundShader(const std::string &Name)
Searches for the shader specified by Name and returns it.
Definition: SoundShaderManagerImpl.cpp:197
This is an interface to the sound shader manager.
Definition: SoundShaderManager.hpp:24
Definition: Renderer.hpp:16
ArrayT< const SoundShaderT * > RegisterSoundShaderScript(const std::string &ScriptFile, const std::string &ModDir)
SoundShaderManagerI Implementation.
Definition: SoundShaderManagerImpl.cpp:41
~SoundShaderManagerImplT()
Destructor.
Definition: SoundShaderManagerImpl.cpp:33
A SoundShader is a description of a sound with various properties.
Definition: SoundShader.hpp:19