![]() |
OpenSourceSimWheelESP32
Open-source wireless steering wheel/button box for ESP32 boards
|
Dependency Manager. More...
#include <InternalServices.hpp>
Public Types | |
| typedef std::vector< Service * > | InstanceSet |
| Type of the set of injected instances. | |
Static Public Member Functions | |
| static Service * | getInstance () |
| Get a singleton instance of the service provider. | |
| static const InstanceSet | getAllInstances () |
| Get all instances of the service provider. | |
| template<typename Provider > | |
| static void | inject (Provider *instance, bool multipleInstances=false) |
| Inject an instance of the service provider to the service interface. | |
| static void | reset () |
| Remove all injected service providers (for testing) | |
Dependency Manager.
| Service | Service interface |
Definition at line 89 of file InternalServices.hpp.
| std::vector<Service *> DependencyManager< Service >::InstanceSet |
Type of the set of injected instances.
Definition at line 92 of file InternalServices.hpp.
|
inlinestatic |
Get all instances of the service provider.
Definition at line 120 of file InternalServices.hpp.
|
inlinestatic |
Get a singleton instance of the service provider.
Definition at line 100 of file InternalServices.hpp.
|
inlinestatic |
Inject an instance of the service provider to the service interface.
| Provider | Service interface |
| instance | Instance of a service provider |
| multipleInstances | When true, instance is retrieved with getAllInstances(). When false, instance is retrieved with getInstance(). |
Definition at line 131 of file InternalServices.hpp.
|
inlinestatic |
Remove all injected service providers (for testing)
Definition at line 151 of file InternalServices.hpp.