summaryrefslogtreecommitdiff
path: root/daemon/src/Assembly-inl.h
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2021-10-16 14:39:18 +0200
committerAki <please@ignore.pl>2021-10-16 14:39:18 +0200
commite811b2f7a084ee34e37b6eb79b9dc2f14d9d1dac (patch)
treed1abd73302bba47e97bf98debd20d263a2447556 /daemon/src/Assembly-inl.h
parentf68fb3b96b593f56ec70ad17f216fe3aedbc020d (diff)
downloadhwd-e811b2f7a084ee34e37b6eb79b9dc2f14d9d1dac.zip
hwd-e811b2f7a084ee34e37b6eb79b9dc2f14d9d1dac.tar.gz
hwd-e811b2f7a084ee34e37b6eb79b9dc2f14d9d1dac.tar.bz2
Added Gpio and Assembly stubs
Diffstat (limited to 'daemon/src/Assembly-inl.h')
-rw-r--r--daemon/src/Assembly-inl.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/daemon/src/Assembly-inl.h b/daemon/src/Assembly-inl.h
new file mode 100644
index 0000000..5cfd026
--- /dev/null
+++ b/daemon/src/Assembly-inl.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include <string>
+
+
+template <typename T>
+void Assembly::add(const std::string & prefix, T & element)
+{
+ element.apply(AssemblyContext{*this, prefix});
+}
+
+
+template <typename T>
+void AssemblyContext::bind(const std::string & name, const T & function)
+{
+ assembly.server.bind(prefix + name, function);
+}