generictask_generated.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. };
  20. int32_t id() const {
  21. return GetField<int32_t>(VT_ID, 0);
  22. }
  23. const flatbuffers::String *file_info() const {
  24. return GetPointer<const flatbuffers::String *>(VT_FILE_INFO);
  25. }
  26. const flatbuffers::String *time() const {
  27. return GetPointer<const flatbuffers::String *>(VT_TIME);
  28. }
  29. const flatbuffers::String *description() const {
  30. return GetPointer<const flatbuffers::String *>(VT_DESCRIPTION);
  31. }
  32. bool is_video() const {
  33. return GetField<uint8_t>(VT_IS_VIDEO, 0) != 0;
  34. }
  35. int32_t mask() const {
  36. return GetField<int32_t>(VT_MASK, 0);
  37. }
  38. const flatbuffers::String *header() const {
  39. return GetPointer<const flatbuffers::String *>(VT_HEADER);
  40. }
  41. const flatbuffers::String *user() const {
  42. return GetPointer<const flatbuffers::String *>(VT_USER);
  43. }
  44. bool Verify(flatbuffers::Verifier &verifier) const {
  45. return VerifyTableStart(verifier) &&
  46. VerifyField<int32_t>(verifier, VT_ID) &&
  47. VerifyOffset(verifier, VT_FILE_INFO) &&
  48. verifier.VerifyString(file_info()) &&
  49. VerifyOffset(verifier, VT_TIME) &&
  50. verifier.VerifyString(time()) &&
  51. VerifyOffset(verifier, VT_DESCRIPTION) &&
  52. verifier.VerifyString(description()) &&
  53. VerifyField<uint8_t>(verifier, VT_IS_VIDEO) &&
  54. VerifyField<int32_t>(verifier, VT_MASK) &&
  55. VerifyOffset(verifier, VT_HEADER) &&
  56. verifier.VerifyString(header()) &&
  57. VerifyOffset(verifier, VT_USER) &&
  58. verifier.VerifyString(user()) &&
  59. verifier.EndTable();
  60. }
  61. };
  62. struct GenericTaskBuilder {
  63. typedef GenericTask Table;
  64. flatbuffers::FlatBufferBuilder &fbb_;
  65. flatbuffers::uoffset_t start_;
  66. void add_id(int32_t id) {
  67. fbb_.AddElement<int32_t>(GenericTask::VT_ID, id, 0);
  68. }
  69. void add_file_info(flatbuffers::Offset<flatbuffers::String> file_info) {
  70. fbb_.AddOffset(GenericTask::VT_FILE_INFO, file_info);
  71. }
  72. void add_time(flatbuffers::Offset<flatbuffers::String> time) {
  73. fbb_.AddOffset(GenericTask::VT_TIME, time);
  74. }
  75. void add_description(flatbuffers::Offset<flatbuffers::String> description) {
  76. fbb_.AddOffset(GenericTask::VT_DESCRIPTION, description);
  77. }
  78. void add_is_video(bool is_video) {
  79. fbb_.AddElement<uint8_t>(GenericTask::VT_IS_VIDEO, static_cast<uint8_t>(is_video), 0);
  80. }
  81. void add_mask(int32_t mask) {
  82. fbb_.AddElement<int32_t>(GenericTask::VT_MASK, mask, 0);
  83. }
  84. void add_header(flatbuffers::Offset<flatbuffers::String> header) {
  85. fbb_.AddOffset(GenericTask::VT_HEADER, header);
  86. }
  87. void add_user(flatbuffers::Offset<flatbuffers::String> user) {
  88. fbb_.AddOffset(GenericTask::VT_USER, user);
  89. }
  90. explicit GenericTaskBuilder(flatbuffers::FlatBufferBuilder &_fbb)
  91. : fbb_(_fbb) {
  92. start_ = fbb_.StartTable();
  93. }
  94. GenericTaskBuilder &operator=(const GenericTaskBuilder &);
  95. flatbuffers::Offset<GenericTask> Finish() {
  96. const auto end = fbb_.EndTable(start_);
  97. auto o = flatbuffers::Offset<GenericTask>(end);
  98. return o;
  99. }
  100. };
  101. inline flatbuffers::Offset<GenericTask> CreateGenericTask(
  102. flatbuffers::FlatBufferBuilder &_fbb,
  103. int32_t id = 0,
  104. flatbuffers::Offset<flatbuffers::String> file_info = 0,
  105. flatbuffers::Offset<flatbuffers::String> time = 0,
  106. flatbuffers::Offset<flatbuffers::String> description = 0,
  107. bool is_video = false,
  108. int32_t mask = 0,
  109. flatbuffers::Offset<flatbuffers::String> header = 0,
  110. flatbuffers::Offset<flatbuffers::String> user = 0) {
  111. GenericTaskBuilder builder_(_fbb);
  112. builder_.add_user(user);
  113. builder_.add_header(header);
  114. builder_.add_mask(mask);
  115. builder_.add_description(description);
  116. builder_.add_time(time);
  117. builder_.add_file_info(file_info);
  118. builder_.add_id(id);
  119. builder_.add_is_video(is_video);
  120. return builder_.Finish();
  121. }
  122. inline flatbuffers::Offset<GenericTask> CreateGenericTaskDirect(
  123. flatbuffers::FlatBufferBuilder &_fbb,
  124. int32_t id = 0,
  125. const char *file_info = nullptr,
  126. const char *time = nullptr,
  127. const char *description = nullptr,
  128. bool is_video = false,
  129. int32_t mask = 0,
  130. const char *header = nullptr,
  131. const char *user = nullptr) {
  132. auto file_info__ = file_info ? _fbb.CreateString(file_info) : 0;
  133. auto time__ = time ? _fbb.CreateString(time) : 0;
  134. auto description__ = description ? _fbb.CreateString(description) : 0;
  135. auto header__ = header ? _fbb.CreateString(header) : 0;
  136. auto user__ = user ? _fbb.CreateString(user) : 0;
  137. return GenericData::CreateGenericTask(
  138. _fbb,
  139. id,
  140. file_info__,
  141. time__,
  142. description__,
  143. is_video,
  144. mask,
  145. header__,
  146. user__);
  147. }
  148. inline const GenericData::GenericTask *GetGenericTask(const void *buf) {
  149. return flatbuffers::GetRoot<GenericData::GenericTask>(buf);
  150. }
  151. inline const GenericData::GenericTask *GetSizePrefixedGenericTask(const void *buf) {
  152. return flatbuffers::GetSizePrefixedRoot<GenericData::GenericTask>(buf);
  153. }
  154. inline bool VerifyGenericTaskBuffer(
  155. flatbuffers::Verifier &verifier) {
  156. return verifier.VerifyBuffer<GenericData::GenericTask>(nullptr);
  157. }
  158. inline bool VerifySizePrefixedGenericTaskBuffer(
  159. flatbuffers::Verifier &verifier) {
  160. return verifier.VerifySizePrefixedBuffer<GenericData::GenericTask>(nullptr);
  161. }
  162. inline void FinishGenericTaskBuffer(
  163. flatbuffers::FlatBufferBuilder &fbb,
  164. flatbuffers::Offset<GenericData::GenericTask> root) {
  165. fbb.Finish(root);
  166. }
  167. inline void FinishSizePrefixedGenericTaskBuffer(
  168. flatbuffers::FlatBufferBuilder &fbb,
  169. flatbuffers::Offset<GenericData::GenericTask> root) {
  170. fbb.FinishSizePrefixed(root);
  171. }
  172. } // namespace GenericData
  173. #endif // FLATBUFFERS_GENERATED_GENERICTASK_GENERICDATA_H_