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::shared_ptr<World> GetActiveWorld()

Access the active World object.

Returns:

A handle to the active world, or an empty pointer if no world is active

std::string GetActiveWorldAddr()

Check the active world’s resource address.

Returns:

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

Public Static Functions

static WorldManager &Get()

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

Returns:

The instance