aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Proxy.h
blob: 97b8afac84ce95b61800544cf01d2dafc41ea8e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include <memory>

#include "ProxyHandler.h"

namespace crepe {

template <typename T>
class Proxy {
public:
	Proxy & operator = (const T &);
	operator const T & () const;

public:
	Proxy(std::unique_ptr<ProxyHandler<T>> handler) : val(std::move(handler)) {}
private:
	std::unique_ptr<ProxyHandler<T>> val = nullptr;
};

}

#include "Proxy.hpp"