aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Proxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/Proxy.h')
-rw-r--r--src/crepe/Proxy.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/crepe/Proxy.h b/src/crepe/Proxy.h
new file mode 100644
index 0000000..97b8afa
--- /dev/null
+++ b/src/crepe/Proxy.h
@@ -0,0 +1,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"