Class ResourceManager

Class Documentation

class ResourceManager

Singleton for handling the loading of resources from a game bundle.

Public Functions

template<typename T>
std::shared_ptr<T> Load(const std::string &address) = delete

Load a resource by address.

Parameters:

address – The resource address to load from

Throws:
  • BadValueException – If the template type does not match the loaded type of the resource

  • NonexistentValueException – If there is no resource at the provided address

Returns:

A handle to the resource

Public Static Functions

static ResourceManager &Get()

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

Returns:

The instance