TheAtlasEngine
 
Loading...
Searching...
No Matches
registry.hpp
1#pragma once
2#include <map>
3#include <core/scene/world.hpp>
4
5namespace atlas {
20 public:
26 system_registry(const std::string& p_name);
27
29
48 static ref<world> create_world(const std::string& p_tag);
49
52
60 static ref<world> get_world(const std::string& p_tag);
61
62 private:
63 ref<world> search_world(const std::string& p_tag);
64
65 // void append_world(const ref<world>& p_world);
66
67 ref<world> append_world_and_get(const ref<world>& p_world);
68
69 private:
70 static system_registry* s_instance;
71 std::string m_tag = "Undefined";
72 std::map<std::string, ref<world>> m_world_registered;
73 };
74};
system registry acts as a utility for managing creation of game worlds initially
Definition registry.hpp:19
system_registry(const std::string &p_name)
construct a new system registry
static ref< world > get_world(const std::string &p_tag)
Searches and returns world if found.
static ref< world > create_world(const std::string &p_tag)
constructs a new world