R-Type
R-Type project
LegacyGraphicalLib.hpp
1 /*
2 ** EPITECH PROJECT, 2022
3 ** gameEngine2
4 ** File description:
5 ** LegacyGraphical
6 */
7 
8 #ifndef LEGACYGRAPHICAL_HPP_
9 #define LEGACYGRAPHICAL_HPP_
10 
11 #include <functional>
12 #include <map>
13 
14 #include "GraphicalLib.hpp"
15 #include "KapEngineDebug.hpp"
16 
17 namespace KapEngine {
18 
19  class KEngine;
20 
21  namespace Graphical {
22  class GraphicalLib;
23  class GraphicalLibManager;
24  }
25 }
26 
27 namespace KapEngine {
28  namespace Graphical {
29 
31 
32  public:
35 
36  void display() override;
37 
38  void startDisplay() override {
39  PROFILER_FUNC_START();
40  DEBUG_LOG("Use " + getName());
41  PROFILER_FUNC_END();
42  }
43 
44  private:
45  std::map<std::string, std::function<void()>> _commands;
46 
47  void registerCommand(std::string const& cmd, std::function<void()>);
48  void executeCommand(std::string const& cmd);
49  bool commandExists(std::string const& cmd);
50 
51  };
52 
53  }
54 }
55 
56 #endif /* !LEGACYGRAPHICAL_HPP_ */
KapEngine::Graphical::LegacyGraphicalLib
Definition: LegacyGraphicalLib.hpp:30
KapEngine::Graphical::GraphicalLibManager
Definition: GraphicalLibManager.hpp:31
KapEngine
main namespace
Definition: Component.hpp:17
KapEngine::Graphical::GraphicalLib
Definition: GraphicalLib.hpp:50