blob: 044d487f3e94fc5b87ab2b5216f037fbf025bfc5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "yacppdic/container.hpp"
#include "yacppdic/detail/internal/wrapper/function_wrapper.hpp"
#include "yacppdic/detail/internal/wrapper/object_wrapper.hpp"
namespace yacppdic
{
void Container::add(
const ObjectType &type,
const WrapperPtr<IGenericWrapper> &wrapper
) noexcept
{
_bindings.insert({ type, wrapper });
}
void Container::remove(const ObjectType &type) noexcept
{
_bindings.erase(type);
}
auto Container::at(const ObjectType &type) const noexcept
-> Container::WrapperPtr<IGenericWrapper>
{
return _bindings.at(type);
}
} // namespace yacppdic
|