- fuse
- mock
- Minimal imports - Only one import (fuse) during configuration.
- Non-intrusive - References to the package fuse should be in just startup code.
- Small API - just enough to get work done.
- Minimal footprint/low overhead - no complicated setup code required.
For a full usage example of these 2 packages please refer to repo Guide to usage of library fuse
Features:
Dependency Injection pattern - primarily used for stateless components, all components are singletons.
- Register components.
- Inject stateless component dependencies.
Resource Locator pattern - primarily used for stateful components, all components are prototypes.
- Register components.
- A "Finder" function is provided to get a fresh copy of the component.
- Inject stateless component dependencies.
Constraints:
- Components can only be registered as pointers.
- Components dependencies can either be through interfaces or pointers to
struct
s.
mock library generates mock code for all the dependencies of a component.
For a full usage example of these 2 packages please refer to repo Guide to usage of library fuse