Hypodermic is an IoC container for C++11. It provides dependency injection to your existing design.
Questions tagged [hypodermic]
6 questions
9
votes
1 answer
Hypodermic - OnActivating
I've been recently trying to use https://github.com/ybainier/Hypodermic for dependency injection on C++. Yet, I am unable to find if it supports the OnActivating event from AutoFac:
builder.RegisterInstance(instance).OnActivating(MyLambdaHere)
Is…

João
- 113
- 4
4
votes
1 answer
I don't understand why I declare an empty internal structure and pass it in the constructor
When I read the source code of Hypodermic, I found an empty structure declared in the constructor of its container. I don't understand why it did this?
class Container : public std::enable_shared_from_this< Container >
{
private:
struct…

candycat
- 435
- 4
- 13
3
votes
2 answers
Variadic template unpacking arguments in typedef
Given the following C++ typedef expression
template struct BoolType : std::true_type {};
template <> struct BoolType< false > : std::false_type {};
typedef BoolType< ArgResolver< Arg1 >::IsResolvable::value && ArgResolver< Arg2…

Stefano
- 3,213
- 9
- 60
- 101
2
votes
1 answer
Move semantics in dependency injection
Is it possible or helpful to employ move semantics when preforming constructor injection?
If so, is Hypodermic setup to allow this?

eigen_enthused
- 525
- 6
- 17
1
vote
1 answer
Using Hypodermic with Boost.Signals2
In order to use Boost.Signals2 with Hypodermic, how would I go about connecting the slots? Would I place the connection code within the OnActivating block?
Am I right in thinking they are not duplicating each others functionality even though…

eigen_enthused
- 525
- 6
- 17
0
votes
1 answer
C++ dependency injection with hypodermic: "resolve" Objects of a super-type
given the following class hierarchy:
class AbstractPanel
{ }
class AbstractComponent : public AbstractPanel
{ }
class Component : public AbstractComponent
{ }
and the following Hypodermic DI Container:
Hypodermic::ContainerBuilder…

VanDahlen
- 93
- 6