My Project
SoundManager.hpp
1 /*
2 ** EPITECH PROJECT, 2022
3 ** B-CPP-500-PAR-5-1-rtype-martin.vanaud
4 ** File description:
5 ** SoundManager
6 */
7 
8 #ifndef SOUNDMANAGER_HPP_
9  #define SOUNDMANAGER_HPP_
10 
11  #include <string>
12  #include <vector>
13  #include <unordered_map>
14 
15  #include "ASound.hpp"
16 
21 class SoundManager {
22  public:
28  SoundManager(std::string const &soundsFile);
39 
46  ASound at(std::string const &index) const;
47 
53  void loadSounds(std::string const &filepath);
54 
55  protected:
56  private:
62  void saveSounds(std::string const &filepath);
63 
64  std::unordered_map<std::string, ASound> _sounds;
65 };
66 
67 #endif /* !SOUNDMANAGER_HPP_ */
SoundManager::at
ASound at(std::string const &index) const
Get the Sound at index sent as param.
Definition: SoundManager.cpp:20
SoundManager::SoundManager
SoundManager()
Construct a new Sound Manager object.
Definition: SoundManager.hpp:33
SoundManager::loadSounds
void loadSounds(std::string const &filepath)
Load all Sounds from a config file.
Definition: SoundManager.cpp:25
SoundManager::~SoundManager
~SoundManager()
Destroy the Sound Manager object.
Definition: SoundManager.hpp:38
SoundManager
Class to store all Sounds.
Definition: SoundManager.hpp:21
ASound
Class containing all elements of an Sound.
Definition: ASound.hpp:18