#pragma once #include #include class Assembly; class AssemblyContext { public: AssemblyContext(Assembly & parent, const std::string & prefix) noexcept; template void bind(const std::string & name, const T & function); private: Assembly & assembly; const std::string & prefix; }; class Assembly { friend AssemblyContext; public: explicit Assembly(rpc::server & server); template void add(const std::string & prefix, T & element); private: rpc::server & server; }; #include "Assembly-inl.h"