aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/apache/arrow/cpp/src/generated/File_generated.h
blob: 06953c4a04044e4f9cf0afe779b16cc232118144 (plain) (blame)
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
// automatically generated by the FlatBuffers compiler, do not modify


#ifndef FLATBUFFERS_GENERATED_FILE_ORG_APACHE_ARROW_FLATBUF_H_
#define FLATBUFFERS_GENERATED_FILE_ORG_APACHE_ARROW_FLATBUF_H_

#include "flatbuffers/flatbuffers.h"

#include "Schema_generated.h"

namespace org {
namespace apache {
namespace arrow {
namespace flatbuf {

struct Footer;
struct FooterBuilder;

struct Block;

FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Block FLATBUFFERS_FINAL_CLASS {
 private:
  int64_t offset_;
  int32_t metaDataLength_;
  int32_t padding0__;
  int64_t bodyLength_;

 public:
  Block() {
    memset(static_cast<void *>(this), 0, sizeof(Block));
  }
  Block(int64_t _offset, int32_t _metaDataLength, int64_t _bodyLength)
      : offset_(flatbuffers::EndianScalar(_offset)),
        metaDataLength_(flatbuffers::EndianScalar(_metaDataLength)),
        padding0__(0),
        bodyLength_(flatbuffers::EndianScalar(_bodyLength)) {
    (void)padding0__;
  }
  /// Index to the start of the RecordBlock (note this is past the Message header)
  int64_t offset() const {
    return flatbuffers::EndianScalar(offset_);
  }
  /// Length of the metadata
  int32_t metaDataLength() const {
    return flatbuffers::EndianScalar(metaDataLength_);
  }
  /// Length of the data (this is aligned so there can be a gap between this and
  /// the metadata).
  int64_t bodyLength() const {
    return flatbuffers::EndianScalar(bodyLength_);
  }
};
FLATBUFFERS_STRUCT_END(Block, 24);

/// ----------------------------------------------------------------------
/// Arrow File metadata
///
struct Footer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
  typedef FooterBuilder Builder;
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_VERSION = 4,
    VT_SCHEMA = 6,
    VT_DICTIONARIES = 8,
    VT_RECORDBATCHES = 10,
    VT_CUSTOM_METADATA = 12
  };
  org::apache::arrow::flatbuf::MetadataVersion version() const {
    return static_cast<org::apache::arrow::flatbuf::MetadataVersion>(GetField<int16_t>(VT_VERSION, 0));
  }
  const org::apache::arrow::flatbuf::Schema *schema() const {
    return GetPointer<const org::apache::arrow::flatbuf::Schema *>(VT_SCHEMA);
  }
  const flatbuffers::Vector<const org::apache::arrow::flatbuf::Block *> *dictionaries() const {
    return GetPointer<const flatbuffers::Vector<const org::apache::arrow::flatbuf::Block *> *>(VT_DICTIONARIES);
  }
  const flatbuffers::Vector<const org::apache::arrow::flatbuf::Block *> *recordBatches() const {
    return GetPointer<const flatbuffers::Vector<const org::apache::arrow::flatbuf::Block *> *>(VT_RECORDBATCHES);
  }
  /// User-defined metadata
  const flatbuffers::Vector<flatbuffers::Offset<org::apache::arrow::flatbuf::KeyValue>> *custom_metadata() const {
    return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<org::apache::arrow::flatbuf::KeyValue>> *>(VT_CUSTOM_METADATA);
  }
  bool Verify(flatbuffers::Verifier &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<int16_t>(verifier, VT_VERSION) &&
           VerifyOffset(verifier, VT_SCHEMA) &&
           verifier.VerifyTable(schema()) &&
           VerifyOffset(verifier, VT_DICTIONARIES) &&
           verifier.VerifyVector(dictionaries()) &&
           VerifyOffset(verifier, VT_RECORDBATCHES) &&
           verifier.VerifyVector(recordBatches()) &&
           VerifyOffset(verifier, VT_CUSTOM_METADATA) &&
           verifier.VerifyVector(custom_metadata()) &&
           verifier.VerifyVectorOfTables(custom_metadata()) &&
           verifier.EndTable();
  }
};

struct FooterBuilder {
  typedef Footer Table;
  flatbuffers::FlatBufferBuilder &fbb_;
  flatbuffers::uoffset_t start_;
  void add_version(org::apache::arrow::flatbuf::MetadataVersion version) {
    fbb_.AddElement<int16_t>(Footer::VT_VERSION, static_cast<int16_t>(version), 0);
  }
  void add_schema(flatbuffers::Offset<org::apache::arrow::flatbuf::Schema> schema) {
    fbb_.AddOffset(Footer::VT_SCHEMA, schema);
  }
  void add_dictionaries(flatbuffers::Offset<flatbuffers::Vector<const org::apache::arrow::flatbuf::Block *>> dictionaries) {
    fbb_.AddOffset(Footer::VT_DICTIONARIES, dictionaries);
  }
  void add_recordBatches(flatbuffers::Offset<flatbuffers::Vector<const org::apache::arrow::flatbuf::Block *>> recordBatches) {
    fbb_.AddOffset(Footer::VT_RECORDBATCHES, recordBatches);
  }
  void add_custom_metadata(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<org::apache::arrow::flatbuf::KeyValue>>> custom_metadata) {
    fbb_.AddOffset(Footer::VT_CUSTOM_METADATA, custom_metadata);
  }
  explicit FooterBuilder(flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  FooterBuilder &operator=(const FooterBuilder &);
  flatbuffers::Offset<Footer> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = flatbuffers::Offset<Footer>(end);
    return o;
  }
};

inline flatbuffers::Offset<Footer> CreateFooter(
    flatbuffers::FlatBufferBuilder &_fbb,
    org::apache::arrow::flatbuf::MetadataVersion version = org::apache::arrow::flatbuf::MetadataVersion::V1,
    flatbuffers::Offset<org::apache::arrow::flatbuf::Schema> schema = 0,
    flatbuffers::Offset<flatbuffers::Vector<const org::apache::arrow::flatbuf::Block *>> dictionaries = 0,
    flatbuffers::Offset<flatbuffers::Vector<const org::apache::arrow::flatbuf::Block *>> recordBatches = 0,
    flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<org::apache::arrow::flatbuf::KeyValue>>> custom_metadata = 0) {
  FooterBuilder builder_(_fbb);
  builder_.add_custom_metadata(custom_metadata);
  builder_.add_recordBatches(recordBatches);
  builder_.add_dictionaries(dictionaries);
  builder_.add_schema(schema);
  builder_.add_version(version);
  return builder_.Finish();
}

inline flatbuffers::Offset<Footer> CreateFooterDirect(
    flatbuffers::FlatBufferBuilder &_fbb,
    org::apache::arrow::flatbuf::MetadataVersion version = org::apache::arrow::flatbuf::MetadataVersion::V1,
    flatbuffers::Offset<org::apache::arrow::flatbuf::Schema> schema = 0,
    const std::vector<org::apache::arrow::flatbuf::Block> *dictionaries = nullptr,
    const std::vector<org::apache::arrow::flatbuf::Block> *recordBatches = nullptr,
    const std::vector<flatbuffers::Offset<org::apache::arrow::flatbuf::KeyValue>> *custom_metadata = nullptr) {
  auto dictionaries__ = dictionaries ? _fbb.CreateVectorOfStructs<org::apache::arrow::flatbuf::Block>(*dictionaries) : 0;
  auto recordBatches__ = recordBatches ? _fbb.CreateVectorOfStructs<org::apache::arrow::flatbuf::Block>(*recordBatches) : 0;
  auto custom_metadata__ = custom_metadata ? _fbb.CreateVector<flatbuffers::Offset<org::apache::arrow::flatbuf::KeyValue>>(*custom_metadata) : 0;
  return org::apache::arrow::flatbuf::CreateFooter(
      _fbb,
      version,
      schema,
      dictionaries__,
      recordBatches__,
      custom_metadata__);
}

inline const org::apache::arrow::flatbuf::Footer *GetFooter(const void *buf) {
  return flatbuffers::GetRoot<org::apache::arrow::flatbuf::Footer>(buf);
}

inline const org::apache::arrow::flatbuf::Footer *GetSizePrefixedFooter(const void *buf) {
  return flatbuffers::GetSizePrefixedRoot<org::apache::arrow::flatbuf::Footer>(buf);
}

inline bool VerifyFooterBuffer(
    flatbuffers::Verifier &verifier) {
  return verifier.VerifyBuffer<org::apache::arrow::flatbuf::Footer>(nullptr);
}

inline bool VerifySizePrefixedFooterBuffer(
    flatbuffers::Verifier &verifier) {
  return verifier.VerifySizePrefixedBuffer<org::apache::arrow::flatbuf::Footer>(nullptr);
}

inline void FinishFooterBuffer(
    flatbuffers::FlatBufferBuilder &fbb,
    flatbuffers::Offset<org::apache::arrow::flatbuf::Footer> root) {
  fbb.Finish(root);
}

inline void FinishSizePrefixedFooterBuffer(
    flatbuffers::FlatBufferBuilder &fbb,
    flatbuffers::Offset<org::apache::arrow::flatbuf::Footer> root) {
  fbb.FinishSizePrefixed(root);
}

}  // namespace flatbuf
}  // namespace arrow
}  // namespace apache
}  // namespace org

#endif  // FLATBUFFERS_GENERATED_FILE_ORG_APACHE_ARROW_FLATBUF_H_