MOTION  0.01
Framework for mixed-protocol multi-party computation
hello_message_generated.h
Go to the documentation of this file.
1 // automatically generated by the FlatBuffers compiler, do not modify
2 
3 
4 #ifndef FLATBUFFERS_GENERATED_HELLOMESSAGE_ENCRYPTO_MOTION_COMMUNICATION_H_
5 #define FLATBUFFERS_GENERATED_HELLOMESSAGE_ENCRYPTO_MOTION_COMMUNICATION_H_
6 
7 #include "flatbuffers/flatbuffers.h"
8 
9 namespace encrypto {
10 namespace motion {
11 namespace communication {
12 
13 struct HelloMessage;
14 struct HelloMessageBuilder;
15 
16 struct HelloMessage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
18  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
25  VT_MOTION_VERSION = 16
26  };
27  uint16_t source_id() const {
28  return GetField<uint16_t>(VT_SOURCE_ID, 0);
29  }
30  uint16_t destination_id() const {
31  return GetField<uint16_t>(VT_DESTINATION_ID, 0);
32  }
33  uint16_t number_of_parties() const {
34  return GetField<uint16_t>(VT_NUMBER_OF_PARTIES, 0);
35  }
36  const flatbuffers::Vector<uint8_t> *input_sharing_seed() const {
37  return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_INPUT_SHARING_SEED);
38  }
39  const flatbuffers::Vector<uint8_t> *fixed_key_aes_seed() const {
40  return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_FIXED_KEY_AES_SEED);
41  }
42  bool online_after_setup() const {
43  return GetField<uint8_t>(VT_ONLINE_AFTER_SETUP, 0) != 0;
44  }
45  float motion_version() const {
46  return GetField<float>(VT_MOTION_VERSION, 0.0f);
47  }
48  bool Verify(flatbuffers::Verifier &verifier) const {
49  return VerifyTableStart(verifier) &&
50  VerifyField<uint16_t>(verifier, VT_SOURCE_ID) &&
51  VerifyField<uint16_t>(verifier, VT_DESTINATION_ID) &&
52  VerifyField<uint16_t>(verifier, VT_NUMBER_OF_PARTIES) &&
53  VerifyOffset(verifier, VT_INPUT_SHARING_SEED) &&
54  verifier.VerifyVector(input_sharing_seed()) &&
55  VerifyOffset(verifier, VT_FIXED_KEY_AES_SEED) &&
56  verifier.VerifyVector(fixed_key_aes_seed()) &&
57  VerifyField<uint8_t>(verifier, VT_ONLINE_AFTER_SETUP) &&
58  VerifyField<float>(verifier, VT_MOTION_VERSION) &&
59  verifier.EndTable();
60  }
61 };
62 
64  typedef HelloMessage Table;
65  flatbuffers::FlatBufferBuilder &fbb_;
66  flatbuffers::uoffset_t start_;
67  void add_source_id(uint16_t source_id) {
68  fbb_.AddElement<uint16_t>(HelloMessage::VT_SOURCE_ID, source_id, 0);
69  }
70  void add_destination_id(uint16_t destination_id) {
71  fbb_.AddElement<uint16_t>(HelloMessage::VT_DESTINATION_ID, destination_id, 0);
72  }
73  void add_number_of_parties(uint16_t number_of_parties) {
74  fbb_.AddElement<uint16_t>(HelloMessage::VT_NUMBER_OF_PARTIES, number_of_parties, 0);
75  }
76  void add_input_sharing_seed(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> input_sharing_seed) {
77  fbb_.AddOffset(HelloMessage::VT_INPUT_SHARING_SEED, input_sharing_seed);
78  }
79  void add_fixed_key_aes_seed(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> fixed_key_aes_seed) {
80  fbb_.AddOffset(HelloMessage::VT_FIXED_KEY_AES_SEED, fixed_key_aes_seed);
81  }
82  void add_online_after_setup(bool online_after_setup) {
83  fbb_.AddElement<uint8_t>(HelloMessage::VT_ONLINE_AFTER_SETUP, static_cast<uint8_t>(online_after_setup), 0);
84  }
85  void add_motion_version(float motion_version) {
86  fbb_.AddElement<float>(HelloMessage::VT_MOTION_VERSION, motion_version, 0.0f);
87  }
88  explicit HelloMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
89  : fbb_(_fbb) {
90  start_ = fbb_.StartTable();
91  }
93  flatbuffers::Offset<HelloMessage> Finish() {
94  const auto end = fbb_.EndTable(start_);
95  auto o = flatbuffers::Offset<HelloMessage>(end);
96  return o;
97  }
98 };
99 
100 inline flatbuffers::Offset<HelloMessage> CreateHelloMessage(
101  flatbuffers::FlatBufferBuilder &_fbb,
102  uint16_t source_id = 0,
103  uint16_t destination_id = 0,
104  uint16_t number_of_parties = 0,
105  flatbuffers::Offset<flatbuffers::Vector<uint8_t>> input_sharing_seed = 0,
106  flatbuffers::Offset<flatbuffers::Vector<uint8_t>> fixed_key_aes_seed = 0,
107  bool online_after_setup = false,
108  float motion_version = 0.0f) {
109  HelloMessageBuilder builder_(_fbb);
110  builder_.add_motion_version(motion_version);
111  builder_.add_fixed_key_aes_seed(fixed_key_aes_seed);
112  builder_.add_input_sharing_seed(input_sharing_seed);
113  builder_.add_number_of_parties(number_of_parties);
114  builder_.add_destination_id(destination_id);
115  builder_.add_source_id(source_id);
116  builder_.add_online_after_setup(online_after_setup);
117  return builder_.Finish();
118 }
119 
120 inline flatbuffers::Offset<HelloMessage> CreateHelloMessageDirect(
121  flatbuffers::FlatBufferBuilder &_fbb,
122  uint16_t source_id = 0,
123  uint16_t destination_id = 0,
124  uint16_t number_of_parties = 0,
125  const std::vector<uint8_t> *input_sharing_seed = nullptr,
126  const std::vector<uint8_t> *fixed_key_aes_seed = nullptr,
127  bool online_after_setup = false,
128  float motion_version = 0.0f) {
129  auto input_sharing_seed__ = input_sharing_seed ? _fbb.CreateVector<uint8_t>(*input_sharing_seed) : 0;
130  auto fixed_key_aes_seed__ = fixed_key_aes_seed ? _fbb.CreateVector<uint8_t>(*fixed_key_aes_seed) : 0;
132  _fbb,
133  source_id,
134  destination_id,
135  number_of_parties,
136  input_sharing_seed__,
137  fixed_key_aes_seed__,
138  online_after_setup,
139  motion_version);
140 }
141 
142 inline const encrypto::motion::communication::HelloMessage *GetHelloMessage(const void *buf) {
143  return flatbuffers::GetRoot<encrypto::motion::communication::HelloMessage>(buf);
144 }
145 
146 inline const encrypto::motion::communication::HelloMessage *GetSizePrefixedHelloMessage(const void *buf) {
147  return flatbuffers::GetSizePrefixedRoot<encrypto::motion::communication::HelloMessage>(buf);
148 }
149 
151  flatbuffers::Verifier &verifier) {
152  return verifier.VerifyBuffer<encrypto::motion::communication::HelloMessage>(nullptr);
153 }
154 
156  flatbuffers::Verifier &verifier) {
157  return verifier.VerifySizePrefixedBuffer<encrypto::motion::communication::HelloMessage>(nullptr);
158 }
159 
161  flatbuffers::FlatBufferBuilder &fbb,
162  flatbuffers::Offset<encrypto::motion::communication::HelloMessage> root) {
163  fbb.Finish(root);
164 }
165 
167  flatbuffers::FlatBufferBuilder &fbb,
168  flatbuffers::Offset<encrypto::motion::communication::HelloMessage> root) {
169  fbb.FinishSizePrefixed(root);
170 }
171 
172 } // namespace communication
173 } // namespace motion
174 } // namespace encrypto
175 
176 #endif // FLATBUFFERS_GENERATED_HELLOMESSAGE_ENCRYPTO_MOTION_COMMUNICATION_H_
encrypto::motion::communication::FLATBUFFERS_FINAL_CLASS::destination_id
uint16_t destination_id() const
Definition: hello_message_generated.h:30
encrypto::motion::communication::FLATBUFFERS_FINAL_CLASS::Builder
HelloMessageBuilder Builder
Definition: hello_message_generated.h:17
VT_DESTINATION_ID
VT_DESTINATION_ID
Definition: hello_message_generated.h:20
encrypto::motion::communication::HelloMessageBuilder::add_number_of_parties
void add_number_of_parties(uint16_t number_of_parties)
Definition: hello_message_generated.h:73
VT_FIXED_KEY_AES_SEED
VT_FIXED_KEY_AES_SEED
Definition: hello_message_generated.h:23
encrypto::motion::communication::FinishHelloMessageBuffer
void FinishHelloMessageBuffer(flatbuffers::FlatBufferBuilder &fbb, flatbuffers::Offset< encrypto::motion::communication::HelloMessage > root)
Definition: hello_message_generated.h:160
encrypto::motion::communication::FLATBUFFERS_FINAL_CLASS::motion_version
float motion_version() const
Definition: hello_message_generated.h:45
encrypto::motion::communication::GetHelloMessage
const encrypto::motion::communication::HelloMessage * GetHelloMessage(const void *buf)
Definition: hello_message_generated.h:142
encrypto::motion::communication::HelloMessageBuilder::add_motion_version
void add_motion_version(float motion_version)
Definition: hello_message_generated.h:85
encrypto::motion::communication::CreateHelloMessage
flatbuffers::Offset< HelloMessage > CreateHelloMessage(flatbuffers::FlatBufferBuilder &_fbb, uint16_t source_id=0, uint16_t destination_id=0, uint16_t number_of_parties=0, flatbuffers::Offset< flatbuffers::Vector< uint8_t >> input_sharing_seed=0, flatbuffers::Offset< flatbuffers::Vector< uint8_t >> fixed_key_aes_seed=0, bool online_after_setup=false, float motion_version=0.0f)
Definition: hello_message_generated.h:100
encrypto::motion::communication::HelloMessageBuilder::fbb_
flatbuffers::FlatBufferBuilder & fbb_
Definition: hello_message_generated.h:65
encrypto::motion::communication::FLATBUFFERS_FINAL_CLASS::fixed_key_aes_seed
const flatbuffers::Vector< uint8_t > * fixed_key_aes_seed() const
Definition: hello_message_generated.h:39
encrypto::motion::communication::HelloMessageBuilder::add_online_after_setup
void add_online_after_setup(bool online_after_setup)
Definition: hello_message_generated.h:82
encrypto::motion::communication::HelloMessageBuilder
Definition: hello_message_generated.h:63
encrypto
Definition: algorithm_description.cpp:35
encrypto::motion::communication::HelloMessageBuilder::Table
HelloMessage Table
Definition: hello_message_generated.h:64
VT_INPUT_SHARING_SEED
VT_INPUT_SHARING_SEED
Definition: hello_message_generated.h:22
encrypto::motion::communication::VerifyHelloMessageBuffer
bool VerifyHelloMessageBuffer(flatbuffers::Verifier &verifier)
Definition: hello_message_generated.h:150
encrypto::motion::communication::VerifySizePrefixedHelloMessageBuffer
bool VerifySizePrefixedHelloMessageBuffer(flatbuffers::Verifier &verifier)
Definition: hello_message_generated.h:155
encrypto::motion::communication::FLATBUFFERS_FINAL_CLASS::online_after_setup
bool online_after_setup() const
Definition: hello_message_generated.h:42
encrypto::motion::communication::GetSizePrefixedHelloMessage
const encrypto::motion::communication::HelloMessage * GetSizePrefixedHelloMessage(const void *buf)
Definition: hello_message_generated.h:146
encrypto::motion::communication::HelloMessageBuilder::add_source_id
void add_source_id(uint16_t source_id)
Definition: hello_message_generated.h:67
encrypto::motion::communication::HelloMessageBuilder::operator=
HelloMessageBuilder & operator=(const HelloMessageBuilder &)
encrypto::motion::communication::CreateHelloMessageDirect
flatbuffers::Offset< HelloMessage > CreateHelloMessageDirect(flatbuffers::FlatBufferBuilder &_fbb, uint16_t source_id=0, uint16_t destination_id=0, uint16_t number_of_parties=0, const std::vector< uint8_t > *input_sharing_seed=nullptr, const std::vector< uint8_t > *fixed_key_aes_seed=nullptr, bool online_after_setup=false, float motion_version=0.0f)
Definition: hello_message_generated.h:120
VT_SOURCE_ID
VT_SOURCE_ID
Definition: hello_message_generated.h:19
VT_NUMBER_OF_PARTIES
VT_NUMBER_OF_PARTIES
Definition: hello_message_generated.h:21
encrypto::motion::communication::HelloMessageBuilder::HelloMessageBuilder
HelloMessageBuilder(flatbuffers::FlatBufferBuilder &_fbb)
Definition: hello_message_generated.h:88
encrypto::motion::communication::HelloMessageBuilder::add_input_sharing_seed
void add_input_sharing_seed(flatbuffers::Offset< flatbuffers::Vector< uint8_t >> input_sharing_seed)
Definition: hello_message_generated.h:76
encrypto::motion::communication::HelloMessageBuilder::Finish
flatbuffers::Offset< HelloMessage > Finish()
Definition: hello_message_generated.h:93
encrypto::motion::communication::HelloMessageBuilder::add_destination_id
void add_destination_id(uint16_t destination_id)
Definition: hello_message_generated.h:70
encrypto::motion::communication::HelloMessageBuilder::start_
flatbuffers::uoffset_t start_
Definition: hello_message_generated.h:66
encrypto::motion::communication::FinishSizePrefixedHelloMessageBuffer
void FinishSizePrefixedHelloMessageBuffer(flatbuffers::FlatBufferBuilder &fbb, flatbuffers::Offset< encrypto::motion::communication::HelloMessage > root)
Definition: hello_message_generated.h:166
encrypto::motion::communication::FLATBUFFERS_FINAL_CLASS::input_sharing_seed
const flatbuffers::Vector< uint8_t > * input_sharing_seed() const
Definition: hello_message_generated.h:36
encrypto::motion::communication::FLATBUFFERS_FINAL_CLASS::Verify
bool Verify(flatbuffers::Verifier &verifier) const
Definition: hello_message_generated.h:48
encrypto::motion::communication::FLATBUFFERS_FINAL_CLASS::source_id
uint16_t source_id() const
Definition: hello_message_generated.h:27
encrypto::motion::communication::FLATBUFFERS_FINAL_CLASS::number_of_parties
uint16_t number_of_parties() const
Definition: hello_message_generated.h:33
VT_ONLINE_AFTER_SETUP
VT_ONLINE_AFTER_SETUP
Definition: hello_message_generated.h:24
encrypto::motion::communication::HelloMessageBuilder::add_fixed_key_aes_seed
void add_fixed_key_aes_seed(flatbuffers::Offset< flatbuffers::Vector< uint8_t >> fixed_key_aes_seed)
Definition: hello_message_generated.h:79