-
Notifications
You must be signed in to change notification settings - Fork 1
/
Trajectories.hpp
97 lines (71 loc) · 2.6 KB
/
Trajectories.hpp
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#pragma once
#include <map>
#include <set>
#include <string>
#include <tuple>
#include <vector>
#include <krpc/decoder.hpp>
#include <krpc/encoder.hpp>
#include <krpc/error.hpp>
#include <krpc/event.hpp>
#include <krpc/object.hpp>
#include <krpc/service.hpp>
#include <krpc/stream.hpp>
namespace krpc {
namespace services {
class Trajectories : public Service {
public:
explicit Trajectories(Client* client);
double get_impact_time();
bool has_impact();
std::tuple<double, double> impact_pos();
::krpc::Stream<double> get_impact_time_stream();
::krpc::Stream<bool> has_impact_stream();
::krpc::Stream<std::tuple<double, double>> impact_pos_stream();
::krpc::schema::ProcedureCall get_impact_time_call();
::krpc::schema::ProcedureCall has_impact_call();
::krpc::schema::ProcedureCall impact_pos_call();
};
} // namespace services
namespace services {
inline Trajectories::Trajectories(Client* client):
Service(client) {
}
inline double Trajectories::get_impact_time() {
std::string _data = this->_client->invoke("Trajectories", "GetImpactTime");
double _result;
decoder::decode(_result, _data, this->_client);
return _result;
}
inline bool Trajectories::has_impact() {
std::string _data = this->_client->invoke("Trajectories", "HasImpact");
bool _result;
decoder::decode(_result, _data, this->_client);
return _result;
}
inline std::tuple<double, double> Trajectories::impact_pos() {
std::string _data = this->_client->invoke("Trajectories", "ImpactPos");
std::tuple<double, double> _result;
decoder::decode(_result, _data, this->_client);
return _result;
}
inline ::krpc::Stream<double> Trajectories::get_impact_time_stream() {
return ::krpc::Stream<double>(this->_client, this->_client->build_call("Trajectories", "GetImpactTime"));
}
inline ::krpc::Stream<bool> Trajectories::has_impact_stream() {
return ::krpc::Stream<bool>(this->_client, this->_client->build_call("Trajectories", "HasImpact"));
}
inline ::krpc::Stream<std::tuple<double, double>> Trajectories::impact_pos_stream() {
return ::krpc::Stream<std::tuple<double, double>>(this->_client, this->_client->build_call("Trajectories", "ImpactPos"));
}
inline ::krpc::schema::ProcedureCall Trajectories::get_impact_time_call() {
return this->_client->build_call("Trajectories", "GetImpactTime");
}
inline ::krpc::schema::ProcedureCall Trajectories::has_impact_call() {
return this->_client->build_call("Trajectories", "HasImpact");
}
inline ::krpc::schema::ProcedureCall Trajectories::impact_pos_call() {
return this->_client->build_call("Trajectories", "ImpactPos");
}
} // namespace services
} // namespace krpc