TheAtlasEngine
 
Loading...
Searching...
No Matches
atlas::system_registry Class Reference

system registry acts as a utility for managing creation of game worlds initially More...

#include <registry.hpp>

Public Member Functions

 system_registry (const std::string &p_name)
 construct a new system registry
 

Static Public Member Functions

static ref< worldcreate_world (const std::string &p_tag)
 constructs a new world
 
static ref< worldget_world (const std::string &p_tag)
 Searches and returns world if found.
 

Detailed Description

system registry acts as a utility for managing creation of game worlds initially

Initially utilized to manage lifetimes of worlds and allow for by default setting to world #0, where we use few functions to get access to specific contexts

TODO: This is going to be replaced with a level streaming manager that will help manage, maintain, and default creationg of a world and a scene. With additional responsibilities in how the world context gets created.

Constructor & Destructor Documentation

◆ system_registry()

atlas::system_registry::system_registry ( const std::string &  p_name)

construct a new system registry

Parameters
p_nameis for specifying a name to give this registry

Member Function Documentation

◆ create_world()

static ref< world > atlas::system_registry::create_world ( const std::string &  p_tag)
static

constructs a new world

Note
system_registry does the following:
  1. Creates world scopes
  2. Manages Lifetimes of world objects
  3. Keeps tracks of the refcounting of references to these world objects
  4. Provide globalized access to other worlds

Initially this was used to create a world with a specified name associated with it

This was used for getting world to be maintained implicitly by system_registry, though this will be changing.

◆ get_world()

static ref< world > atlas::system_registry::get_world ( const std::string &  p_tag)
static

Searches and returns world if found.

Returns nullptr if world not found

searches in getting the world and looks up based on its specified name

Returns
nullptr if not found, otherwise return shared_ptr<world>

The documentation for this class was generated from the following file: