class ServiceLocator

template<class T>

A locator system that allows you to quickly find a service of a specific type.

Public

Methods

staticInstance

static T *Instance()

Returns an instance of the service we are looking for, if one is available.

Internal

Methods

staticProvideInternal

static void ProvideInternal(T *service)

Starts providing a new service when "instance()" is called.

Replaces the previous service.

staticRemoveInternal

static void RemoveInternal(T *service)

Stops providing a service when "instance()" is called.

Ignored if the current service doesn't match the provided service.