#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) noexcept; template >> void to() noexcept; void to_factory(Interface func) noexcept; private: Container *_container; }; class Container { public: Container() noexcept = default; template BindingBuilder bind() noexcept; template >> std::shared_ptr get() const noexcept; template >> Interface get() const noexcept; std::unordered_map, ObjectTypeHasher> bindings; }; #include "container.tpp"