// automatically generated by the FlatBuffers compiler, do not modify


#ifndef FLATBUFFERS_GENERATED_ASSETB_FLAT_BIGFOOT_H_
#define FLATBUFFERS_GENERATED_ASSETB_FLAT_BIGFOOT_H_

#include "flatbuffers/flatbuffers.h"

// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
              FLATBUFFERS_VERSION_MINOR == 12 &&
              FLATBUFFERS_VERSION_REVISION == 19,
             "Non-compatible flatbuffers version included");

#include "Engine/Asset/Reference.hpp"
#include "System/UUID/UUID.hpp"
#include "Engine/Asset/Reference.hpp"
#include "EngineTests/Asset/AssetA_fwd.hpp"
#include "EngineTests/Asset/AssetB_fwd.hpp"
#include "Engine/Asset/Reference_generated.hpp"
#include "EngineTests/Asset/AssetA_generated.hpp"

#include "EASTL/unique_ptr.h"
#include "EASTL/string.h"
#include "EASTL/vector.h"

namespace Flat {
namespace Bigfoot {

struct AssetB;
struct AssetBBuilder;
struct AssetBT;

inline const ::flatbuffers::TypeTable *AssetBTypeTable();

struct AssetBT : public ::flatbuffers::NativeTable {
  typedef AssetB TableType;
  static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
    return "Flat.Bigfoot.AssetBT";
  }
  ::Bigfoot::HardReference<::Bigfoot::AssetA> asset_a_ref{};
  eastl::vector<::Bigfoot::SoftReference<::Bigfoot::AssetA>> asset_a_refs{};
};

struct AssetB FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
  typedef AssetBT NativeTableType;
  typedef AssetBBuilder Builder;
  struct Traits;
  static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
    return AssetBTypeTable();
  }
  static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
    return "Flat.Bigfoot.AssetB";
  }
  enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
    VT_ASSET_A_REF = 4,
    VT_ASSET_A_REFS = 6
  };
  const Flat::Bigfoot::HardReference *asset_a_ref() const {
    return GetStruct<const Flat::Bigfoot::HardReference *>(VT_ASSET_A_REF);
  }
  const ::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *> *asset_a_refs() const {
    return GetPointer<const ::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *> *>(VT_ASSET_A_REFS);
  }
  template <bool B = false>
  bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<Flat::Bigfoot::HardReference>(verifier, VT_ASSET_A_REF, 1) &&
           VerifyOffset(verifier, VT_ASSET_A_REFS) &&
           verifier.VerifyVector(asset_a_refs()) &&
           verifier.EndTable();
  }
  AssetBT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  void UnPackTo(AssetBT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
  static ::flatbuffers::Offset<AssetB> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
};

struct AssetBBuilder {
  typedef AssetB Table;
  ::flatbuffers::FlatBufferBuilder &fbb_;
  ::flatbuffers::uoffset_t start_;
  void add_asset_a_ref(const Flat::Bigfoot::HardReference *asset_a_ref) {
    fbb_.AddStruct(AssetB::VT_ASSET_A_REF, asset_a_ref);
  }
  void add_asset_a_refs(::flatbuffers::Offset<::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *>> asset_a_refs) {
    fbb_.AddOffset(AssetB::VT_ASSET_A_REFS, asset_a_refs);
  }
  explicit AssetBBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
        : fbb_(_fbb) {
    start_ = fbb_.StartTable();
  }
  ::flatbuffers::Offset<AssetB> Finish() {
    const auto end = fbb_.EndTable(start_);
    auto o = ::flatbuffers::Offset<AssetB>(end);
    return o;
  }
};

inline ::flatbuffers::Offset<AssetB> CreateAssetB(
    ::flatbuffers::FlatBufferBuilder &_fbb,
    const Flat::Bigfoot::HardReference *asset_a_ref = nullptr,
    ::flatbuffers::Offset<::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *>> asset_a_refs = 0) {
  AssetBBuilder builder_(_fbb);
  builder_.add_asset_a_refs(asset_a_refs);
  builder_.add_asset_a_ref(asset_a_ref);
  return builder_.Finish();
}

struct AssetB::Traits {
  using type = AssetB;
  static auto constexpr Create = CreateAssetB;
};

::flatbuffers::Offset<AssetB> CreateAssetB(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);

inline AssetBT *AssetB::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
  auto _o = std::make_unique<AssetBT>();
  UnPackTo(_o.get(), _resolver);
  return _o.release();
}

inline void AssetB::UnPackTo(AssetBT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
  (void)_o;
  (void)_resolver;
  { auto _e = asset_a_ref(); if (_e) _o->asset_a_ref = ::flatbuffers::UnPackHardReferenceAssetA(*_e); }
  { auto _e = asset_a_refs(); if (_e) { _o->asset_a_refs.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->asset_a_refs[_i] = ::flatbuffers::UnPackSoftReferenceAssetA(*_e->Get(_i)); } } else { _o->asset_a_refs.resize(0); } }
}

inline ::flatbuffers::Offset<AssetB> CreateAssetB(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  return AssetB::Pack(_fbb, _o, _rehasher);
}

inline ::flatbuffers::Offset<AssetB> AssetB::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
  (void)_rehasher;
  (void)_o;
  struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetBT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
  auto _asset_a_ref = ::flatbuffers::PackHardReferenceAssetA(_o->asset_a_ref);
  auto _asset_a_refs = _fbb.CreateVectorOfNativeStructs<Flat::Bigfoot::SoftReference, ::Bigfoot::SoftReference<::Bigfoot::AssetA>>(_o->asset_a_refs.data(), _o->asset_a_refs.size(), ::flatbuffers::PackSoftReferenceAssetA);
  return Flat::Bigfoot::CreateAssetB(
      _fbb,
      &_asset_a_ref,
      _asset_a_refs);
}

inline const ::flatbuffers::TypeTable *AssetBTypeTable() {
  static const ::flatbuffers::TypeCode type_codes[] = {
    { ::flatbuffers::ET_SEQUENCE, 0, 0 },
    { ::flatbuffers::ET_SEQUENCE, 1, 1 }
  };
  static const ::flatbuffers::TypeFunction type_refs[] = {
    Flat::Bigfoot::HardReferenceTypeTable,
    Flat::Bigfoot::SoftReferenceTypeTable
  };
  static const ::flatbuffers::TypeTable tt = {
    ::flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, nullptr
  };
  return &tt;
}

inline const Flat::Bigfoot::AssetB *GetAssetB(const void *buf) {
  return ::flatbuffers::GetRoot<Flat::Bigfoot::AssetB>(buf);
}

inline const Flat::Bigfoot::AssetB *GetSizePrefixedAssetB(const void *buf) {
  return ::flatbuffers::GetSizePrefixedRoot<Flat::Bigfoot::AssetB>(buf);
}

template <bool B = false>
inline bool VerifyAssetBBuffer(
    ::flatbuffers::VerifierTemplate<B> &verifier) {
  return verifier.template VerifyBuffer<Flat::Bigfoot::AssetB>(nullptr);
}

template <bool B = false>
inline bool VerifySizePrefixedAssetBBuffer(
    ::flatbuffers::VerifierTemplate<B> &verifier) {
  return verifier.template VerifySizePrefixedBuffer<Flat::Bigfoot::AssetB>(nullptr);
}

inline const char *AssetBExtension() {
  return "bfbs";
}

inline void FinishAssetBBuffer(
    ::flatbuffers::FlatBufferBuilder &fbb,
    ::flatbuffers::Offset<Flat::Bigfoot::AssetB> root) {
  fbb.Finish(root);
}

inline void FinishSizePrefixedAssetBBuffer(
    ::flatbuffers::FlatBufferBuilder &fbb,
    ::flatbuffers::Offset<Flat::Bigfoot::AssetB> root) {
  fbb.FinishSizePrefixed(root);
}

inline eastl::unique_ptr<Flat::Bigfoot::AssetBT> UnPackAssetB(
    const void *buf,
    const ::flatbuffers::resolver_function_t *res = nullptr) {
  return eastl::unique_ptr<Flat::Bigfoot::AssetBT>(GetAssetB(buf)->UnPack(res));
}

inline eastl::unique_ptr<Flat::Bigfoot::AssetBT> UnPackSizePrefixedAssetB(
    const void *buf,
    const ::flatbuffers::resolver_function_t *res = nullptr) {
  return eastl::unique_ptr<Flat::Bigfoot::AssetBT>(GetSizePrefixedAssetB(buf)->UnPack(res));
}

}  // namespace Bigfoot
}  // namespace Flat

#endif  // FLATBUFFERS_GENERATED_ASSETB_FLAT_BIGFOOT_H_
