![]() |
Consolix
|
Utility functions for working with the ServiceLocator.
More...
Go to the source code of this file.
Namespaces | |
| namespace | consolix |
| < Utility modules and helpers. | |
Macros | |
| #define | _CONSOLIX_SERVICE_UTILS_HPP_INCLUDED |
Functions | |
| template<typename T> | |
| void | consolix::register_service (std::function< std::shared_ptr< T >()> creator) |
Registers a resource or service globally. Registers a resource or service with the ServiceLocator using the provided creator function. | |
| template<typename T> | |
| void | consolix::register_service () |
| Registers a resource with default construction globally. Registers a resource or service using default construction. | |
| template<typename T> | |
| T & | consolix::get_service () |
Retrieves a resource globally. Retrieves a reference to a globally registered resource from the ServiceLocator. | |
| template<typename T> | |
| bool | consolix::has_service () |
| Checks if a resource is registered globally. | |
| void | consolix::clear_all () |
Clears all registered resources globally. Clears all resources and services registered in the ServiceLocator | |
Utility functions for working with the ServiceLocator.
Definition in file service_utils.hpp.
| #define _CONSOLIX_SERVICE_UTILS_HPP_INCLUDED |
Definition at line 3 of file service_utils.hpp.