1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00
xn65/inc/xna/game/servicecontainer.hpp

21 lines
435 B
C++
Raw Normal View History

2024-04-27 15:31:23 -03:00
#ifndef XNA_GAME_SERVICECONTAINER_HPP
#define XNA_GAME_SERVICECONTAINER_HPP
#include "../default.hpp"
2024-05-06 10:32:17 -03:00
#include "../csharp/service.hpp"
#include <map>
2024-04-27 15:31:23 -03:00
namespace xna {
2024-05-06 10:32:17 -03:00
class GameServiceContainer : public IServiceProvider {
public:
void AddService(Type& type, std::any& provider);
// Inherited via IServiceProvider
std::any GetService(Type& serviceType) override;
2024-04-27 15:31:23 -03:00
2024-05-06 10:32:17 -03:00
private:
std::map<size_t, std::any> services;
2024-04-27 15:31:23 -03:00
};
}
#endif