mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-03 09:52:28 +00:00
committed by
Wouter van Oortmerssen
parent
a7461433c6
commit
88abae649c
@@ -18,8 +18,11 @@ struct Weapon;
|
|||||||
struct WeaponT;
|
struct WeaponT;
|
||||||
|
|
||||||
bool operator==(const Vec3 &lhs, const Vec3 &rhs);
|
bool operator==(const Vec3 &lhs, const Vec3 &rhs);
|
||||||
|
bool operator!=(const Vec3 &lhs, const Vec3 &rhs);
|
||||||
bool operator==(const MonsterT &lhs, const MonsterT &rhs);
|
bool operator==(const MonsterT &lhs, const MonsterT &rhs);
|
||||||
|
bool operator!=(const MonsterT &lhs, const MonsterT &rhs);
|
||||||
bool operator==(const WeaponT &lhs, const WeaponT &rhs);
|
bool operator==(const WeaponT &lhs, const WeaponT &rhs);
|
||||||
|
bool operator!=(const WeaponT &lhs, const WeaponT &rhs);
|
||||||
|
|
||||||
inline const flatbuffers::TypeTable *Vec3TypeTable();
|
inline const flatbuffers::TypeTable *Vec3TypeTable();
|
||||||
|
|
||||||
@@ -155,6 +158,11 @@ inline bool operator==(const EquipmentUnion &lhs, const EquipmentUnion &rhs) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const EquipmentUnion &lhs, const EquipmentUnion &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
bool VerifyEquipment(flatbuffers::Verifier &verifier, const void *obj, Equipment type);
|
bool VerifyEquipment(flatbuffers::Verifier &verifier, const void *obj, Equipment type);
|
||||||
bool VerifyEquipmentVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
|
bool VerifyEquipmentVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
|
||||||
|
|
||||||
@@ -201,6 +209,11 @@ inline bool operator==(const Vec3 &lhs, const Vec3 &rhs) {
|
|||||||
(lhs.z() == rhs.z());
|
(lhs.z() == rhs.z());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const Vec3 &lhs, const Vec3 &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct MonsterT : public flatbuffers::NativeTable {
|
struct MonsterT : public flatbuffers::NativeTable {
|
||||||
typedef Monster TableType;
|
typedef Monster TableType;
|
||||||
flatbuffers::unique_ptr<Vec3> pos;
|
flatbuffers::unique_ptr<Vec3> pos;
|
||||||
@@ -230,6 +243,11 @@ inline bool operator==(const MonsterT &lhs, const MonsterT &rhs) {
|
|||||||
(lhs.equipped == rhs.equipped);
|
(lhs.equipped == rhs.equipped);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const MonsterT &lhs, const MonsterT &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
typedef MonsterT NativeTableType;
|
typedef MonsterT NativeTableType;
|
||||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||||
@@ -441,6 +459,11 @@ inline bool operator==(const WeaponT &lhs, const WeaponT &rhs) {
|
|||||||
(lhs.damage == rhs.damage);
|
(lhs.damage == rhs.damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const WeaponT &lhs, const WeaponT &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct Weapon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
struct Weapon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
typedef WeaponT NativeTableType;
|
typedef WeaponT NativeTableType;
|
||||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||||
|
|||||||
@@ -250,6 +250,8 @@ class CppGenerator : public BaseGenerator {
|
|||||||
NativeName(Name(struct_def), &struct_def, parser_.opts);
|
NativeName(Name(struct_def), &struct_def, parser_.opts);
|
||||||
code_ += "bool operator==(const " + nativeName + " &lhs, const " +
|
code_ += "bool operator==(const " + nativeName + " &lhs, const " +
|
||||||
nativeName + " &rhs);";
|
nativeName + " &rhs);";
|
||||||
|
code_ += "bool operator!=(const " + nativeName + " &lhs, const " +
|
||||||
|
nativeName + " &rhs);";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
code_ += "";
|
code_ += "";
|
||||||
@@ -1174,6 +1176,14 @@ class CppGenerator : public BaseGenerator {
|
|||||||
code_ += " }";
|
code_ += " }";
|
||||||
code_ += " }";
|
code_ += " }";
|
||||||
code_ += "}";
|
code_ += "}";
|
||||||
|
|
||||||
|
code_ += "";
|
||||||
|
code_ +=
|
||||||
|
"inline bool operator!=(const {{NAME}}Union &lhs, const "
|
||||||
|
"{{NAME}}Union &rhs) {";
|
||||||
|
code_ += " return !(lhs == rhs);";
|
||||||
|
code_ += "}";
|
||||||
|
code_ += "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1583,6 +1593,14 @@ class CppGenerator : public BaseGenerator {
|
|||||||
"{{NATIVE_NAME}} &{{CMP_RHS}}) {";
|
"{{NATIVE_NAME}} &{{CMP_RHS}}) {";
|
||||||
code_ += "{{CMP_OP}}";
|
code_ += "{{CMP_OP}}";
|
||||||
code_ += "}";
|
code_ += "}";
|
||||||
|
|
||||||
|
code_ += "";
|
||||||
|
code_ +=
|
||||||
|
"inline bool operator!=(const {{NATIVE_NAME}} &lhs, const "
|
||||||
|
"{{NATIVE_NAME}} &rhs) {";
|
||||||
|
code_ += " return !(lhs == rhs);";
|
||||||
|
code_ += "}";
|
||||||
|
code_ += "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenOperatorNewDelete(const StructDef &struct_def) {
|
void GenOperatorNewDelete(const StructDef &struct_def) {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ struct MonsterExtra;
|
|||||||
struct MonsterExtraT;
|
struct MonsterExtraT;
|
||||||
|
|
||||||
bool operator==(const MonsterExtraT &lhs, const MonsterExtraT &rhs);
|
bool operator==(const MonsterExtraT &lhs, const MonsterExtraT &rhs);
|
||||||
|
bool operator!=(const MonsterExtraT &lhs, const MonsterExtraT &rhs);
|
||||||
|
|
||||||
inline const flatbuffers::TypeTable *MonsterExtraTypeTable();
|
inline const flatbuffers::TypeTable *MonsterExtraTypeTable();
|
||||||
|
|
||||||
@@ -43,6 +44,11 @@ inline bool operator==(const MonsterExtraT &lhs, const MonsterExtraT &rhs) {
|
|||||||
(lhs.testd_ninf == rhs.testd_ninf);
|
(lhs.testd_ninf == rhs.testd_ninf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const MonsterExtraT &lhs, const MonsterExtraT &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct MonsterExtra FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
struct MonsterExtra FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
typedef MonsterExtraT NativeTableType;
|
typedef MonsterExtraT NativeTableType;
|
||||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||||
|
|||||||
@@ -45,21 +45,31 @@ struct TypeAliasesT;
|
|||||||
} // namespace Example
|
} // namespace Example
|
||||||
|
|
||||||
bool operator==(const InParentNamespaceT &lhs, const InParentNamespaceT &rhs);
|
bool operator==(const InParentNamespaceT &lhs, const InParentNamespaceT &rhs);
|
||||||
|
bool operator!=(const InParentNamespaceT &lhs, const InParentNamespaceT &rhs);
|
||||||
namespace Example2 {
|
namespace Example2 {
|
||||||
|
|
||||||
bool operator==(const MonsterT &lhs, const MonsterT &rhs);
|
bool operator==(const MonsterT &lhs, const MonsterT &rhs);
|
||||||
|
bool operator!=(const MonsterT &lhs, const MonsterT &rhs);
|
||||||
} // namespace Example2
|
} // namespace Example2
|
||||||
|
|
||||||
namespace Example {
|
namespace Example {
|
||||||
|
|
||||||
bool operator==(const Test &lhs, const Test &rhs);
|
bool operator==(const Test &lhs, const Test &rhs);
|
||||||
|
bool operator!=(const Test &lhs, const Test &rhs);
|
||||||
bool operator==(const TestSimpleTableWithEnumT &lhs, const TestSimpleTableWithEnumT &rhs);
|
bool operator==(const TestSimpleTableWithEnumT &lhs, const TestSimpleTableWithEnumT &rhs);
|
||||||
|
bool operator!=(const TestSimpleTableWithEnumT &lhs, const TestSimpleTableWithEnumT &rhs);
|
||||||
bool operator==(const Vec3 &lhs, const Vec3 &rhs);
|
bool operator==(const Vec3 &lhs, const Vec3 &rhs);
|
||||||
|
bool operator!=(const Vec3 &lhs, const Vec3 &rhs);
|
||||||
bool operator==(const Ability &lhs, const Ability &rhs);
|
bool operator==(const Ability &lhs, const Ability &rhs);
|
||||||
|
bool operator!=(const Ability &lhs, const Ability &rhs);
|
||||||
bool operator==(const StatT &lhs, const StatT &rhs);
|
bool operator==(const StatT &lhs, const StatT &rhs);
|
||||||
|
bool operator!=(const StatT &lhs, const StatT &rhs);
|
||||||
bool operator==(const ReferrableT &lhs, const ReferrableT &rhs);
|
bool operator==(const ReferrableT &lhs, const ReferrableT &rhs);
|
||||||
|
bool operator!=(const ReferrableT &lhs, const ReferrableT &rhs);
|
||||||
bool operator==(const MonsterT &lhs, const MonsterT &rhs);
|
bool operator==(const MonsterT &lhs, const MonsterT &rhs);
|
||||||
|
bool operator!=(const MonsterT &lhs, const MonsterT &rhs);
|
||||||
bool operator==(const TypeAliasesT &lhs, const TypeAliasesT &rhs);
|
bool operator==(const TypeAliasesT &lhs, const TypeAliasesT &rhs);
|
||||||
|
bool operator!=(const TypeAliasesT &lhs, const TypeAliasesT &rhs);
|
||||||
|
|
||||||
} // namespace Example
|
} // namespace Example
|
||||||
|
|
||||||
@@ -260,6 +270,11 @@ inline bool operator==(const AnyUnion &lhs, const AnyUnion &rhs) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const AnyUnion &lhs, const AnyUnion &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
bool VerifyAny(flatbuffers::Verifier &verifier, const void *obj, Any type);
|
bool VerifyAny(flatbuffers::Verifier &verifier, const void *obj, Any type);
|
||||||
bool VerifyAnyVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
|
bool VerifyAnyVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
|
||||||
|
|
||||||
@@ -396,6 +411,11 @@ inline bool operator==(const AnyUniqueAliasesUnion &lhs, const AnyUniqueAliasesU
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const AnyUniqueAliasesUnion &lhs, const AnyUniqueAliasesUnion &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
bool VerifyAnyUniqueAliases(flatbuffers::Verifier &verifier, const void *obj, AnyUniqueAliases type);
|
bool VerifyAnyUniqueAliases(flatbuffers::Verifier &verifier, const void *obj, AnyUniqueAliases type);
|
||||||
bool VerifyAnyUniqueAliasesVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
|
bool VerifyAnyUniqueAliasesVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
|
||||||
|
|
||||||
@@ -505,6 +525,11 @@ inline bool operator==(const AnyAmbiguousAliasesUnion &lhs, const AnyAmbiguousAl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const AnyAmbiguousAliasesUnion &lhs, const AnyAmbiguousAliasesUnion &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
bool VerifyAnyAmbiguousAliases(flatbuffers::Verifier &verifier, const void *obj, AnyAmbiguousAliases type);
|
bool VerifyAnyAmbiguousAliases(flatbuffers::Verifier &verifier, const void *obj, AnyAmbiguousAliases type);
|
||||||
bool VerifyAnyAmbiguousAliasesVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
|
bool VerifyAnyAmbiguousAliasesVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
|
||||||
|
|
||||||
@@ -545,6 +570,11 @@ inline bool operator==(const Test &lhs, const Test &rhs) {
|
|||||||
(lhs.b() == rhs.b());
|
(lhs.b() == rhs.b());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const Test &lhs, const Test &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Vec3 FLATBUFFERS_FINAL_CLASS {
|
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Vec3 FLATBUFFERS_FINAL_CLASS {
|
||||||
private:
|
private:
|
||||||
float x_;
|
float x_;
|
||||||
@@ -624,6 +654,11 @@ inline bool operator==(const Vec3 &lhs, const Vec3 &rhs) {
|
|||||||
(lhs.test3() == rhs.test3());
|
(lhs.test3() == rhs.test3());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const Vec3 &lhs, const Vec3 &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Ability FLATBUFFERS_FINAL_CLASS {
|
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Ability FLATBUFFERS_FINAL_CLASS {
|
||||||
private:
|
private:
|
||||||
uint32_t id_;
|
uint32_t id_;
|
||||||
@@ -664,6 +699,11 @@ inline bool operator==(const Ability &lhs, const Ability &rhs) {
|
|||||||
(lhs.distance() == rhs.distance());
|
(lhs.distance() == rhs.distance());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const Ability &lhs, const Ability &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace Example
|
} // namespace Example
|
||||||
|
|
||||||
struct InParentNamespaceT : public flatbuffers::NativeTable {
|
struct InParentNamespaceT : public flatbuffers::NativeTable {
|
||||||
@@ -676,6 +716,11 @@ inline bool operator==(const InParentNamespaceT &, const InParentNamespaceT &) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const InParentNamespaceT &lhs, const InParentNamespaceT &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct InParentNamespace FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
struct InParentNamespace FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
typedef InParentNamespaceT NativeTableType;
|
typedef InParentNamespaceT NativeTableType;
|
||||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||||
@@ -725,6 +770,11 @@ inline bool operator==(const MonsterT &, const MonsterT &) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const MonsterT &lhs, const MonsterT &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
typedef MonsterT NativeTableType;
|
typedef MonsterT NativeTableType;
|
||||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||||
@@ -779,6 +829,11 @@ inline bool operator==(const TestSimpleTableWithEnumT &lhs, const TestSimpleTabl
|
|||||||
(lhs.color == rhs.color);
|
(lhs.color == rhs.color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const TestSimpleTableWithEnumT &lhs, const TestSimpleTableWithEnumT &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct TestSimpleTableWithEnum FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
struct TestSimpleTableWithEnum FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
typedef TestSimpleTableWithEnumT NativeTableType;
|
typedef TestSimpleTableWithEnumT NativeTableType;
|
||||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||||
@@ -849,6 +904,11 @@ inline bool operator==(const StatT &lhs, const StatT &rhs) {
|
|||||||
(lhs.count == rhs.count);
|
(lhs.count == rhs.count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const StatT &lhs, const StatT &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct Stat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
struct Stat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
typedef StatT NativeTableType;
|
typedef StatT NativeTableType;
|
||||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||||
@@ -954,6 +1014,11 @@ inline bool operator==(const ReferrableT &lhs, const ReferrableT &rhs) {
|
|||||||
(lhs.id == rhs.id);
|
(lhs.id == rhs.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const ReferrableT &lhs, const ReferrableT &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct Referrable FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
struct Referrable FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
typedef ReferrableT NativeTableType;
|
typedef ReferrableT NativeTableType;
|
||||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||||
@@ -1128,6 +1193,11 @@ inline bool operator==(const MonsterT &lhs, const MonsterT &rhs) {
|
|||||||
(lhs.vector_of_enums == rhs.vector_of_enums);
|
(lhs.vector_of_enums == rhs.vector_of_enums);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const MonsterT &lhs, const MonsterT &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// an example documentation comment: monster object
|
/// an example documentation comment: monster object
|
||||||
struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
struct Monster FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
typedef MonsterT NativeTableType;
|
typedef MonsterT NativeTableType;
|
||||||
@@ -2040,6 +2110,11 @@ inline bool operator==(const TypeAliasesT &lhs, const TypeAliasesT &rhs) {
|
|||||||
(lhs.vf64 == rhs.vf64);
|
(lhs.vf64 == rhs.vf64);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const TypeAliasesT &lhs, const TypeAliasesT &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct TypeAliases FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
struct TypeAliases FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
typedef TypeAliasesT NativeTableType;
|
typedef TypeAliasesT NativeTableType;
|
||||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||||
|
|||||||
@@ -2423,19 +2423,25 @@ void EqualOperatorTest() {
|
|||||||
MonsterT a;
|
MonsterT a;
|
||||||
MonsterT b;
|
MonsterT b;
|
||||||
TEST_EQ(b == a, true);
|
TEST_EQ(b == a, true);
|
||||||
|
TEST_EQ(b != a, false);
|
||||||
|
|
||||||
b.mana = 33;
|
b.mana = 33;
|
||||||
TEST_EQ(b == a, false);
|
TEST_EQ(b == a, false);
|
||||||
|
TEST_EQ(b != a, true);
|
||||||
b.mana = 150;
|
b.mana = 150;
|
||||||
TEST_EQ(b == a, true);
|
TEST_EQ(b == a, true);
|
||||||
|
TEST_EQ(b != a, false);
|
||||||
|
|
||||||
b.inventory.push_back(3);
|
b.inventory.push_back(3);
|
||||||
TEST_EQ(b == a, false);
|
TEST_EQ(b == a, false);
|
||||||
|
TEST_EQ(b != a, true);
|
||||||
b.inventory.clear();
|
b.inventory.clear();
|
||||||
TEST_EQ(b == a, true);
|
TEST_EQ(b == a, true);
|
||||||
|
TEST_EQ(b != a, false);
|
||||||
|
|
||||||
b.test.type = Any_Monster;
|
b.test.type = Any_Monster;
|
||||||
TEST_EQ(b == a, false);
|
TEST_EQ(b == a, false);
|
||||||
|
TEST_EQ(b != a, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// For testing any binaries, e.g. from fuzzing.
|
// For testing any binaries, e.g. from fuzzing.
|
||||||
|
|||||||
@@ -17,9 +17,13 @@ struct Movie;
|
|||||||
struct MovieT;
|
struct MovieT;
|
||||||
|
|
||||||
bool operator==(const AttackerT &lhs, const AttackerT &rhs);
|
bool operator==(const AttackerT &lhs, const AttackerT &rhs);
|
||||||
|
bool operator!=(const AttackerT &lhs, const AttackerT &rhs);
|
||||||
bool operator==(const Rapunzel &lhs, const Rapunzel &rhs);
|
bool operator==(const Rapunzel &lhs, const Rapunzel &rhs);
|
||||||
|
bool operator!=(const Rapunzel &lhs, const Rapunzel &rhs);
|
||||||
bool operator==(const BookReader &lhs, const BookReader &rhs);
|
bool operator==(const BookReader &lhs, const BookReader &rhs);
|
||||||
|
bool operator!=(const BookReader &lhs, const BookReader &rhs);
|
||||||
bool operator==(const MovieT &lhs, const MovieT &rhs);
|
bool operator==(const MovieT &lhs, const MovieT &rhs);
|
||||||
|
bool operator!=(const MovieT &lhs, const MovieT &rhs);
|
||||||
|
|
||||||
inline const flatbuffers::TypeTable *AttackerTypeTable();
|
inline const flatbuffers::TypeTable *AttackerTypeTable();
|
||||||
|
|
||||||
@@ -180,6 +184,11 @@ inline bool operator==(const CharacterUnion &lhs, const CharacterUnion &rhs) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const CharacterUnion &lhs, const CharacterUnion &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
bool VerifyCharacter(flatbuffers::Verifier &verifier, const void *obj, Character type);
|
bool VerifyCharacter(flatbuffers::Verifier &verifier, const void *obj, Character type);
|
||||||
bool VerifyCharacterVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
|
bool VerifyCharacterVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
|
||||||
|
|
||||||
@@ -208,6 +217,11 @@ inline bool operator==(const Rapunzel &lhs, const Rapunzel &rhs) {
|
|||||||
(lhs.hair_length() == rhs.hair_length());
|
(lhs.hair_length() == rhs.hair_length());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const Rapunzel &lhs, const Rapunzel &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) BookReader FLATBUFFERS_FINAL_CLASS {
|
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) BookReader FLATBUFFERS_FINAL_CLASS {
|
||||||
private:
|
private:
|
||||||
int32_t books_read_;
|
int32_t books_read_;
|
||||||
@@ -233,6 +247,11 @@ inline bool operator==(const BookReader &lhs, const BookReader &rhs) {
|
|||||||
(lhs.books_read() == rhs.books_read());
|
(lhs.books_read() == rhs.books_read());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const BookReader &lhs, const BookReader &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct AttackerT : public flatbuffers::NativeTable {
|
struct AttackerT : public flatbuffers::NativeTable {
|
||||||
typedef Attacker TableType;
|
typedef Attacker TableType;
|
||||||
int32_t sword_attack_damage;
|
int32_t sword_attack_damage;
|
||||||
@@ -246,6 +265,11 @@ inline bool operator==(const AttackerT &lhs, const AttackerT &rhs) {
|
|||||||
(lhs.sword_attack_damage == rhs.sword_attack_damage);
|
(lhs.sword_attack_damage == rhs.sword_attack_damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const AttackerT &lhs, const AttackerT &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct Attacker FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
struct Attacker FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
typedef AttackerT NativeTableType;
|
typedef AttackerT NativeTableType;
|
||||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||||
@@ -312,6 +336,11 @@ inline bool operator==(const MovieT &lhs, const MovieT &rhs) {
|
|||||||
(lhs.characters == rhs.characters);
|
(lhs.characters == rhs.characters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool operator!=(const MovieT &lhs, const MovieT &rhs) {
|
||||||
|
return !(lhs == rhs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct Movie FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
struct Movie FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||||
typedef MovieT NativeTableType;
|
typedef MovieT NativeTableType;
|
||||||
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
static const flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||||
|
|||||||
Reference in New Issue
Block a user