blob: 8ffc03823c4450528d9c7ed59e304d35addbbad7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#pragma once
#include <string>
#include <rpc/server.h>
class Assembly;
class AssemblyContext
{
public:
AssemblyContext(Assembly & parent, const std::string & prefix) noexcept;
template <typename T> 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 <typename T> void add(const std::string & prefix, T & element);
private:
rpc::server & server;
};
#include "Assembly-inl.h"
|