-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathargs.h
More file actions
53 lines (40 loc) · 1.28 KB
/
Copy pathargs.h
File metadata and controls
53 lines (40 loc) · 1.28 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef arch_args_h
#define arch_args_h
#include <string>
#include <map>
//#include "nlohmann/json.hpp"
namespace arch {
// using json = nlohmann::json;
// using string = std::string;
// struct payload_error {
// int64_t transaction_id;
// payload_error(int64_t id)
// : transaction_id(id) {};
// const char* what() {return "payload error";}
// const int64_t get_id() {return transaction_id;}
// };
struct In {
int expected; // expected number
std::map<std::string, int32_t> questions_assement;
std::map<std::string, double> current_knowledge_points;
std::map<std::string, int32_t> preceding_questions_assement;
std::map<std::string, double> knowledge_points;
};
struct Out {
int32_t code ;
std::vector<std::string> payload; // recommended question ids
};
// struct TransactionIn {
// int64_t id;
// In payload;
// };
// struct TransactionOut {
// int64_t id;
// Out payload;
// };
// void from_json(const nlohmann::json&, In&);
// void to_json(nlohmann::json&, const Out&);
// void from_json(const nlohmann::json&, TransactionIn&);
// void to_json(nlohmann::json&, const TransactionOut&);
}
#endif // end of arch_args_h