aboutsummaryrefslogtreecommitdiff
path: root/src/DI/function_wrapper.hpp
blob: e6468f284ef88769c4014e93dabd9d3862e963c7 (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 noexcept override;

private:
	const Interface _func;
};

#include "function_wrapper.tpp"