Skip to content

File system_registry.hpp

File List > atlas > core > system_framework > system_registry.hpp

Go to the documentation of this file

#pragma once
#include <map>
#include <core/scene/world.hpp>

namespace atlas {
    class system_registry {
    public:
        system_registry(const std::string& p_tag);

        ~system_registry();

        static ref<world_scope> create_world(const std::string& p_tag);

        static ref<world_scope> get_world(const std::string& p_tag);

    private:
        ref<world_scope> search_world(const std::string& p_tag);

        void append_world(const ref<world_scope>& p_world);

        ref<world_scope> append_world_scope(const ref<world_scope>& p_world);

    private:
        static system_registry* s_instance;
        std::string m_tag = "Undefined";
        std::map<std::string, ref<world_scope>> m_world_registered;
    };
};