80 lines
2.5 KiB
C++
80 lines
2.5 KiB
C++
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
#ifndef FLATBUFFERS_GENERATED_NAMESPACETEST1_NAMESPACEA_NAMESPACEB_H_
|
|
#define FLATBUFFERS_GENERATED_NAMESPACETEST1_NAMESPACEA_NAMESPACEB_H_
|
|
|
|
#include "flatbuffers/flatbuffers.h"
|
|
|
|
|
|
namespace NamespaceA {
|
|
namespace NamespaceB {
|
|
|
|
struct TableInNestedNS;
|
|
struct StructInNestedNS;
|
|
|
|
enum EnumInNestedNS {
|
|
EnumInNestedNS_A = 0,
|
|
EnumInNestedNS_B = 1,
|
|
EnumInNestedNS_C = 2
|
|
};
|
|
|
|
inline const char **EnumNamesEnumInNestedNS() {
|
|
static const char *names[] = { "A", "B", "C", nullptr };
|
|
return names;
|
|
}
|
|
|
|
inline const char *EnumNameEnumInNestedNS(EnumInNestedNS e) { return EnumNamesEnumInNestedNS()[static_cast<int>(e)]; }
|
|
|
|
MANUALLY_ALIGNED_STRUCT(4) StructInNestedNS FLATBUFFERS_FINAL_CLASS {
|
|
private:
|
|
int32_t a_;
|
|
int32_t b_;
|
|
|
|
public:
|
|
StructInNestedNS(int32_t _a, int32_t _b)
|
|
: a_(flatbuffers::EndianScalar(_a)), b_(flatbuffers::EndianScalar(_b)) { }
|
|
|
|
int32_t a() const { return flatbuffers::EndianScalar(a_); }
|
|
void mutate_a(int32_t _a) { flatbuffers::WriteScalar(&a_, _a); }
|
|
int32_t b() const { return flatbuffers::EndianScalar(b_); }
|
|
void mutate_b(int32_t _b) { flatbuffers::WriteScalar(&b_, _b); }
|
|
};
|
|
STRUCT_END(StructInNestedNS, 8);
|
|
|
|
struct TableInNestedNS FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|
enum {
|
|
VT_FOO = 4,
|
|
};
|
|
int32_t foo() const { return GetField<int32_t>(VT_FOO, 0); }
|
|
bool mutate_foo(int32_t _foo) { return SetField(VT_FOO, _foo); }
|
|
bool Verify(flatbuffers::Verifier &verifier) const {
|
|
return VerifyTableStart(verifier) &&
|
|
VerifyField<int32_t>(verifier, VT_FOO) &&
|
|
verifier.EndTable();
|
|
}
|
|
};
|
|
|
|
struct TableInNestedNSBuilder {
|
|
flatbuffers::FlatBufferBuilder &fbb_;
|
|
flatbuffers::uoffset_t start_;
|
|
void add_foo(int32_t foo) { fbb_.AddElement<int32_t>(TableInNestedNS::VT_FOO, foo, 0); }
|
|
TableInNestedNSBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); }
|
|
TableInNestedNSBuilder &operator=(const TableInNestedNSBuilder &);
|
|
flatbuffers::Offset<TableInNestedNS> Finish() {
|
|
auto o = flatbuffers::Offset<TableInNestedNS>(fbb_.EndTable(start_, 1));
|
|
return o;
|
|
}
|
|
};
|
|
|
|
inline flatbuffers::Offset<TableInNestedNS> CreateTableInNestedNS(flatbuffers::FlatBufferBuilder &_fbb,
|
|
int32_t foo = 0) {
|
|
TableInNestedNSBuilder builder_(_fbb);
|
|
builder_.add_foo(foo);
|
|
return builder_.Finish();
|
|
}
|
|
|
|
} // namespace NamespaceB
|
|
} // namespace NamespaceA
|
|
|
|
#endif // FLATBUFFERS_GENERATED_NAMESPACETEST1_NAMESPACEA_NAMESPACEB_H_
|