Class WorldManager

Class Documentation

class WorldManager

Active world management singleton.

Public Functions

void SetActiveWorld(const std::string &addr, bool noload = false)

Set the active world.

Parameters:
  • addr – The resource address of the world to activate

  • noload – Set this to true to not load the world if it isn’t currently loaded

Throws:
  • BadValueException – If the provided address is malformed

  • NonexistentValueException – If the provided address does not reference a world

  • NonexistentValueException – If noload is set and the world is not currently loaded

std::string GetActiveWorld()

Check the active world.

Returns:

The resource address of the active world, or an empty string if no world is active

std::shared_ptr<World> operator()()

Access the active World object.

Throws:

BadValueException – If there is no active world

Public Static Functions

static WorldManager &Get()

Get the instance and create one if there isn’t one.

Returns:

The instance