The kangaru library is a dependency injection container (IoC) for C++11, C++14 and C++17. It implements autowiring of functions and class constuctors.
Questions tagged [kangaru]
3 questions
2
votes
1 answer
How to properly use IoC container?
I'm very new to IoC idea and I'm trying to jump over the Service Locator pattern.
I chose the Kangaru implementation. Suppose I want to use Audio and Logger services in different places of my app. What I have now:
#include
…

qloq
- 689
- 1
- 5
- 15
1
vote
1 answer
How to use Kangaru C++ auto-wiring
Following my previous question, I would like to achieve the following with minimum boilerplate code.
I understand that Kangaru has autowiring feature to reduce code.
Here the original working version of the code.
#include…

Y.H.Cohen
- 41
- 7
1
vote
1 answer
How to use C++ Kangaru IOC library
I'm trying to do some basic stuff with the kgr library but to be frank it is not so intuitive.
As you will see I have 2 interfaces and 2 concrete classes. The B concrete class should receive by injection in its ctor the registered instance of IA…

Y.H.Cohen
- 41
- 7