diff options
Diffstat (limited to 'daemon/src/Assembly-inl.h')
-rw-r--r-- | daemon/src/Assembly-inl.h | 17 |
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); +} |