My Project
AssetManager.hpp
1 /*
2 ** EPITECH PROJECT, 2022
3 ** B-CPP-500-PAR-5-1-rtype-martin.vanaud
4 ** File description:
5 ** AssetManager
6 */
7 
8 #ifndef ASSETMANAGER_HPP_
9  #define ASSETMANAGER_HPP_
10 
11  #include <string>
12  #include <vector>
13  #include <unordered_map>
14 
15  #include "Asset.hpp"
16 
20 class AssetManager {
21  public:
27  AssetManager(std::string const &assetsFile);
28 
33 
38 
45  Asset at(std::string const &index) const;
46 
52  void loadAssets(std::string const &filepath);
53 
54  protected:
55  private:
61  void saveAssets(std::string const &filepath);
62 
63  std::unordered_map<std::string, Asset> _assets;
64 };
65 
66 #endif /* !ASSETMANAGER_HPP_ */
AssetManager::~AssetManager
~AssetManager()
Destroy the Asset Manager object.
Definition: AssetManager.hpp:37
AssetManager::loadAssets
void loadAssets(std::string const &filepath)
Load all assets from a config file.
Definition: AssetManager.cpp:26
AssetManager
Class to store all Assets.
Definition: AssetManager.hpp:20
AssetManager::at
Asset at(std::string const &index) const
Get the Asset at index sent as param.
Definition: AssetManager.cpp:21
Asset
Class containing all elements of an Asset.
Definition: Asset.hpp:21
AssetManager::AssetManager
AssetManager()
Construct a new Asset Manager object.
Definition: AssetManager.hpp:32