class
#include <nCine/ServiceLocator.h>
ServiceLocator Provides base services to requesting classes.
Public functions
- auto GetAudioDevice() -> IAudioDevice&
- Returns reference to the current audio device instance.
-
void RegisterAudioDevice(std::
unique_ptr<IAudioDevice> service) - Registers an audio device provider.
- void UnregisterAudioDevice()
- Unregisters the audio device provider and reinstates the null one.
- auto GetThreadPool() -> IThreadPool&
- Returns reference to the current thread pool instance.
-
void RegisterThreadPool(std::
unique_ptr<IThreadPool> service) - Registers a thread pool provider.
- void UnregisterThreadPool()
- Unregisters the thread pool provider and reinstates the null one.
- auto GetGfxCapabilities() -> const IGfxCapabilities&
- Returns reference to the current graphics capabilities instance.
-
void RegisterGfxCapabilities(std::
unique_ptr<IGfxCapabilities> service) - Registers a graphics capabilities provider.
- void UnregisterGfxCapabilities()
- Unregisters the graphics capabilitiesprovider and reinstates the null one.
- void UnregisterAll()
- Unregisters every registered service and reinstates null ones.
Friends
- auto theServiceLocator() -> ServiceLocator&