-
Notifications
You must be signed in to change notification settings - Fork 83
Resolving components
Yohan edited this page Oct 24, 2018
·
3 revisions
Most of the time you won't need to actually call container->resolve< T >()
by yourself since the container will do it for you automatically.
auto object = container->resolve< T >();
object
is a std::shared_ptr< T >
.
auto lObject = container->resolveNamed< T >("lObject");
object
is a std::shared_ptr< T >
.
auto objects = container->resolveAll< T >();
objects
is a std::vector< std::shared_ptr< T > >
.
Read this section to learn more about the runtime registration behavior.