generictask_generated.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. // automatically generated by the FlatBuffers compiler, do not modify
  2. #ifndef FLATBUFFERS_GENERATED_GENERICTASK_GENERICDATA_H_
  3. #define FLATBUFFERS_GENERATED_GENERICTASK_GENERICDATA_H_
  4. #include "flatbuffers/flatbuffers.h"
  5. namespace GenericData {
  6. struct GenericTask;
  7. struct GenericTaskBuilder;
  8. struct GenericTask FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  9. typedef GenericTaskBuilder Builder;
  10. enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
  11. VT_ID = 4,
  12. VT_FILE_INFO = 6,
  13. VT_TIME = 8,
  14. VT_DESCRIPTION = 10,
  15. VT_IS_VIDEO = 12,
  16. VT_MASK = 14,
  17. VT_HEADER = 16,
  18. VT_USER = 18,
  19. VT_RECURRING = 20,
  20. VT_NOTIFY = 22
  21. };
  22. int32_t id() const {
  23. return GetField<int32_t>(VT_ID, 0);
  24. }
  25. const flatbuffers::String *file_info() const {
  26. return GetPointer<const flatbuffers::String *>(VT_FILE_INFO);
  27. }
  28. const flatbuffers::String *time() const {
  29. return GetPointer<const flatbuffers::String *>(VT_TIME);
  30. }
  31. const flatbuffers::String *description() const {
  32. return GetPointer<const flatbuffers::String *>(VT_DESCRIPTION);
  33. }
  34. bool is_video() const {
  35. return GetField<uint8_t>(VT_IS_VIDEO, 0) != 0;
  36. }
  37. int32_t mask() const {
  38. return GetField<int32_t>(VT_MASK, 0);
  39. }
  40. const flatbuffers::String *header() const {
  41. return GetPointer<const flatbuffers::String *>(VT_HEADER);
  42. }
  43. const flatbuffers::String *user() const {
  44. return GetPointer<const flatbuffers::String *>(VT_USER);
  45. }
  46. int32_t recurring() const {
  47. return GetField<int32_t>(VT_RECURRING, 0);
  48. }
  49. bool notify() const {
  50. return GetField<uint8_t>(VT_NOTIFY, 0) != 0;
  51. }
  52. bool Verify(flatbuffers::Verifier &verifier) const {
  53. return VerifyTableStart(verifier) &&
  54. VerifyField<int32_t>(verifier, VT_ID) &&
  55. VerifyOffset(verifier, VT_FILE_INFO) &&
  56. verifier.VerifyString(file_info()) &&
  57. VerifyOffset(verifier, VT_TIME) &&
  58. verifier.VerifyString(time()) &&
  59. VerifyOffset(verifier, VT_DESCRIPTION) &&
  60. verifier.VerifyString(description()) &&
  61. VerifyField<uint8_t>(verifier, VT_IS_VIDEO) &&
  62. VerifyField<int32_t>(verifier, VT_MASK) &&
  63. VerifyOffset(verifier, VT_HEADER) &&
  64. verifier.VerifyString(header()) &&
  65. VerifyOffset(verifier, VT_USER) &&
  66. verifier.VerifyString(user()) &&
  67. VerifyField<int32_t>(verifier, VT_RECURRING) &&
  68. VerifyField<uint8_t>(verifier, VT_NOTIFY) &&
  69. verifier.EndTable();
  70. }
  71. };
  72. struct GenericTaskBuilder {
  73. typedef GenericTask Table;
  74. flatbuffers::FlatBufferBuilder &fbb_;
  75. flatbuffers::uoffset_t start_;
  76. void add_id(int32_t id) {
  77. fbb_.AddElement<int32_t>(GenericTask::VT_ID, id, 0);
  78. }
  79. void add_file_info(flatbuffers::Offset<flatbuffers::String> file_info) {
  80. fbb_.AddOffset(GenericTask::VT_FILE_INFO, file_info);
  81. }
  82. void add_time(flatbuffers::Offset<flatbuffers::String> time) {
  83. fbb_.AddOffset(GenericTask::VT_TIME, time);
  84. }
  85. void add_description(flatbuffers::Offset<flatbuffers::String> description) {
  86. fbb_.AddOffset(GenericTask::VT_DESCRIPTION, description);
  87. }
  88. void add_is_video(bool is_video) {
  89. fbb_.AddElement<uint8_t>(GenericTask::VT_IS_VIDEO, static_cast<uint8_t>(is_video), 0);
  90. }
  91. void add_mask(int32_t mask) {
  92. fbb_.AddElement<int32_t>(GenericTask::VT_MASK, mask, 0);
  93. }
  94. void add_header(flatbuffers::Offset<flatbuffers::String> header) {
  95. fbb_.AddOffset(GenericTask::VT_HEADER, header);
  96. }
  97. void add_user(flatbuffers::Offset<flatbuffers::String> user) {
  98. fbb_.AddOffset(GenericTask::VT_USER, user);
  99. }
  100. void add_recurring(int32_t recurring) {
  101. fbb_.AddElement<int32_t>(GenericTask::VT_RECURRING, recurring, 0);
  102. }
  103. void add_notify(bool notify) {
  104. fbb_.AddElement<uint8_t>(GenericTask::VT_NOTIFY, static_cast<uint8_t>(notify), 0);
  105. }
  106. explicit GenericTaskBuilder(flatbuffers::FlatBufferBuilder &_fbb)
  107. : fbb_(_fbb) {
  108. start_ = fbb_.StartTable();
  109. }
  110. GenericTaskBuilder &operator=(const GenericTaskBuilder &);
  111. flatbuffers::Offset<GenericTask> Finish() {
  112. const auto end = fbb_.EndTable(start_);
  113. auto o = flatbuffers::Offset<GenericTask>(end);
  114. return o;
  115. }
  116. };
  117. inline flatbuffers::Offset<GenericTask> CreateGenericTask(
  118. flatbuffers::FlatBufferBuilder &_fbb,
  119. int32_t id = 0,
  120. flatbuffers::Offset<flatbuffers::String> file_info = 0,
  121. flatbuffers::Offset<flatbuffers::String> time = 0,
  122. flatbuffers::Offset<flatbuffers::String> description = 0,
  123. bool is_video = false,
  124. int32_t mask = 0,
  125. flatbuffers::Offset<flatbuffers::String> header = 0,
  126. flatbuffers::Offset<flatbuffers::String> user = 0,
  127. int32_t recurring = 0,
  128. bool notify = false) {
  129. GenericTaskBuilder builder_(_fbb);
  130. builder_.add_recurring(recurring);
  131. builder_.add_user(user);
  132. builder_.add_header(header);
  133. builder_.add_mask(mask);
  134. builder_.add_description(description);
  135. builder_.add_time(time);
  136. builder_.add_file_info(file_info);
  137. builder_.add_id(id);
  138. builder_.add_notify(notify);
  139. builder_.add_is_video(is_video);
  140. return builder_.Finish();
  141. }
  142. inline flatbuffers::Offset<GenericTask> CreateGenericTaskDirect(
  143. flatbuffers::FlatBufferBuilder &_fbb,
  144. int32_t id = 0,
  145. const char *file_info = nullptr,
  146. const char *time = nullptr,
  147. const char *description = nullptr,
  148. bool is_video = false,
  149. int32_t mask = 0,
  150. const char *header = nullptr,
  151. const char *user = nullptr,
  152. int32_t recurring = 0,
  153. bool notify = false) {
  154. auto file_info__ = file_info ? _fbb.CreateString(file_info) : 0;
  155. auto time__ = time ? _fbb.CreateString(time) : 0;
  156. auto description__ = description ? _fbb.CreateString(description) : 0;
  157. auto header__ = header ? _fbb.CreateString(header) : 0;
  158. auto user__ = user ? _fbb.CreateString(user) : 0;
  159. return GenericData::CreateGenericTask(
  160. _fbb,
  161. id,
  162. file_info__,
  163. time__,
  164. description__,
  165. is_video,
  166. mask,
  167. header__,
  168. user__,
  169. recurring,
  170. notify);
  171. }
  172. inline const GenericData::GenericTask *GetGenericTask(const void *buf) {
  173. return flatbuffers::GetRoot<GenericData::GenericTask>(buf);
  174. }
  175. inline const GenericData::GenericTask *GetSizePrefixedGenericTask(const void *buf) {
  176. return flatbuffers::GetSizePrefixedRoot<GenericData::GenericTask>(buf);
  177. }
  178. inline bool VerifyGenericTaskBuffer(
  179. flatbuffers::Verifier &verifier) {
  180. return verifier.VerifyBuffer<GenericData::GenericTask>(nullptr);
  181. }
  182. inline bool VerifySizePrefixedGenericTaskBuffer(
  183. flatbuffers::Verifier &verifier) {
  184. return verifier.VerifySizePrefixedBuffer<GenericData::GenericTask>(nullptr);
  185. }
  186. inline void FinishGenericTaskBuffer(
  187. flatbuffers::FlatBufferBuilder &fbb,
  188. flatbuffers::Offset<GenericData::GenericTask> root) {
  189. fbb.Finish(root);
  190. }
  191. inline void FinishSizePrefixedGenericTaskBuffer(
  192. flatbuffers::FlatBufferBuilder &fbb,
  193. flatbuffers::Offset<GenericData::GenericTask> root) {
  194. fbb.FinishSizePrefixed(root);
  195. }
  196. } // namespace GenericData
  197. #endif // FLATBUFFERS_GENERATED_GENERICTASK_GENERICDATA_H_