Guest User

Untitled

a guest
Dec 15th, 2020
42
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // automatically generated by the FlatBuffers compiler, do not modify
  2.  
  3.  
  4. #ifndef FLATBUFFERS_GENERATED_COMMAND_TCPIPSERVER_H_
  5. #define FLATBUFFERS_GENERATED_COMMAND_TCPIPSERVER_H_
  6.  
  7. #include "flatbuffers/flatbuffers.h"
  8.  
  9. namespace TcpIpServer {
  10.  
  11. struct Command;
  12. struct CommandBuilder;
  13.  
  14. struct Command FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  15. typedef CommandBuilder Builder;
  16. enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
  17. VT_ID = 4,
  18. VT_NAME = 6
  19. };
  20. int32_t id() const {
  21. return GetField<int32_t>(VT_ID, 0);
  22. }
  23. const flatbuffers::String *name() const {
  24. return GetPointer<const flatbuffers::String *>(VT_NAME);
  25. }
  26. bool Verify(flatbuffers::Verifier &verifier) const {
  27. return VerifyTableStart(verifier) &&
  28. VerifyField<int32_t>(verifier, VT_ID) &&
  29. VerifyOffset(verifier, VT_NAME) &&
  30. verifier.VerifyString(name()) &&
  31. verifier.EndTable();
  32. }
  33. };
  34.  
  35. struct CommandBuilder {
  36. typedef Command Table;
  37. flatbuffers::FlatBufferBuilder &fbb_;
  38. flatbuffers::uoffset_t start_;
  39. void add_id(int32_t id) {
  40. fbb_.AddElement<int32_t>(Command::VT_ID, id, 0);
  41. }
  42. void add_name(flatbuffers::Offset<flatbuffers::String> name) {
  43. fbb_.AddOffset(Command::VT_NAME, name);
  44. }
  45. explicit CommandBuilder(flatbuffers::FlatBufferBuilder &_fbb)
  46. : fbb_(_fbb) {
  47. start_ = fbb_.StartTable();
  48. }
  49. flatbuffers::Offset<Command> Finish() {
  50. const auto end = fbb_.EndTable(start_);
  51. auto o = flatbuffers::Offset<Command>(end);
  52. return o;
  53. }
  54. };
  55.  
  56. inline flatbuffers::Offset<Command> CreateCommand(
  57. flatbuffers::FlatBufferBuilder &_fbb,
  58. int32_t id = 0,
  59. flatbuffers::Offset<flatbuffers::String> name = 0) {
  60. CommandBuilder builder_(_fbb);
  61. builder_.add_name(name);
  62. builder_.add_id(id);
  63. return builder_.Finish();
  64. }
  65.  
  66. inline flatbuffers::Offset<Command> CreateCommandDirect(
  67. flatbuffers::FlatBufferBuilder &_fbb,
  68. int32_t id = 0,
  69. const char *name = nullptr) {
  70. auto name__ = name ? _fbb.CreateString(name) : 0;
  71. return TcpIpServer::CreateCommand(
  72. _fbb,
  73. id,
  74. name__);
  75. }
  76.  
  77. inline const TcpIpServer::Command *GetCommand(const void *buf) {
  78. return flatbuffers::GetRoot<TcpIpServer::Command>(buf);
  79. }
  80.  
  81. inline const TcpIpServer::Command *GetSizePrefixedCommand(const void *buf) {
  82. return flatbuffers::GetSizePrefixedRoot<TcpIpServer::Command>(buf);
  83. }
  84.  
  85. inline bool VerifyCommandBuffer(
  86. flatbuffers::Verifier &verifier) {
  87. return verifier.VerifyBuffer<TcpIpServer::Command>(nullptr);
  88. }
  89.  
  90. inline bool VerifySizePrefixedCommandBuffer(
  91. flatbuffers::Verifier &verifier) {
  92. return verifier.VerifySizePrefixedBuffer<TcpIpServer::Command>(nullptr);
  93. }
  94.  
  95. inline void FinishCommandBuffer(
  96. flatbuffers::FlatBufferBuilder &fbb,
  97. flatbuffers::Offset<TcpIpServer::Command> root) {
  98. fbb.Finish(root);
  99. }
  100.  
  101. inline void FinishSizePrefixedCommandBuffer(
  102. flatbuffers::FlatBufferBuilder &fbb,
  103. flatbuffers::Offset<TcpIpServer::Command> root) {
  104. fbb.FinishSizePrefixed(root);
  105. }
  106.  
  107. } // namespace TcpIpServer
  108.  
  109. #endif // FLATBUFFERS_GENERATED_COMMAND_TCPIPSERVER_H_
  110.  
RAW Paste Data