aboutsummaryrefslogtreecommitdiff
path: root/src/DI/function_wrapper.hpp
blob: f135e7f014ecfbbdd6eea7e52e583bca4c50f554 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include "DI/container.hpp"
#include "DI/interfaces/wrapper.hpp"

#include <memory>

template <class Interface>
class FunctionWrapper : public IWrapper<Interface>
{
public:
	explicit FunctionWrapper(Interface func) noexcept;

	[[nodiscard]] Interface get() const override;

private:
	const Interface _func;
};

#include "function_wrapper.tpp"