'
' Copyright (c) 2012-2016 Krzysztof Jusiak (krzysztof at jusiak dot net)
'
' Distributed under the Boost Software License, Version 1.0.
' (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
'
@startuml

package Boost.DI {

    package core <<Rect>> {
        class any_type {
            operator T()
        }
        class binder {
            resolve(Deps)
        }
        class dependency {
            in(Scope)
            named(Name)
            to(T)
        }
        class injector {
            injector(TArgs...)
            T create()
        }
    }

    package scopes <<Rect>> {
        class deduce {
            create(...)
        }
        class instance {
            create(...)
        }
        class singleton {
            create(...)
        }
        class unique {
            create(...)
        }
    }

    package policies <<Rect>> {
        class constructible {
            operator()(T)
        }
    }

    package providers <<Rect>> {
        class heap {
            get()
        }

        class stack_over_heap {
            get()
        }
    }

    package wrappers <<Rect>> {
        class wrappers.shared {
            operator T&()
            operator const T&()
            operator shared_ptr<T>()
        }
        class wrappers.unique {
            operator T()
            operator T*()
            operator T&&()
            operator unique_ptr<T>()
            operator shared_ptr<T>()
        }
    }

    class bind {
    }

    class make_injector {
    }

    class config {
        policies(...)
        provider(...)
    }

    dependency <|-- bind
    scopes - bind
    make_injector - bind

    make_injector - injector
    make_injector - config
    config - policies
    config - providers
    scopes - wrappers
    binder - dependency

    injector --* binder
    injector --* any_type
}

@enduml
