#pragma once #include "DI/interfaces/wrapper.hpp" #include "DI/object_type.hpp" #include "DI/type_traits.hpp" #include #include #include class Container; template class BindingBuilder { public: explicit BindingBuilder(Container *container); template >> void to(); void to_factory(Interface func); private: Container *_container; }; class Container { public: Container() = default; template BindingBuilder bind(); template >> std::shared_ptr get() const; template >> Interface get() const; std::unordered_map, ObjectTypeHasher> bindings; }; #include "container.tpp"