aboutsummaryrefslogtreecommitdiff
path: root/src/container.cpp
blob: 00efc279b25f750e687f4395efe448bb6738bf53 (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 BaseObjectType &type,
	const WrapperPtr<IGenericWrapper> &wrapper
) noexcept
{
	_bindings.insert({ type, wrapper });
}

void Container::remove(const BaseObjectType &type) noexcept
{
	_bindings.erase(type);
}

Container::WrapperPtr<IGenericWrapper> Container::at(const BaseObjectType &type
) const noexcept
{
	return _bindings.at(type);
}

} // namespace yacppdic