Line data Source code
1 : #pragma once
2 :
3 : #include <string>
4 : #include <memory>
5 : #include <functional>
6 :
7 : namespace demo{
8 :
9 : namespace request
10 : {
11 4 : struct get_hashed
12 : {
13 : std::string key;
14 : typedef std::unique_ptr<get_hashed> ptr;
15 :
16 0 : static get_hashed create_schema()
17 : {
18 0 : get_hashed sch;
19 0 : sch.key = "key1";
20 0 : return sch;
21 : }
22 : };
23 : }
24 :
25 : namespace response
26 : {
27 1 : struct get_hashed
28 : {
29 : size_t value = 0;
30 : bool status = false;
31 : typedef std::unique_ptr<get_hashed> ptr;
32 : typedef std::function< void(ptr)> handler;
33 :
34 0 : static get_hashed create_schema()
35 : {
36 0 : get_hashed sch;
37 0 : sch.value = std::hash<std::string>()("value1");
38 0 : sch.status = true;
39 0 : return sch;
40 : }
41 :
42 : };
43 : }
44 :
45 : }
|