// 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");
// Ensure the included flatbuffers.h is Bigfoot's fork - stock
// flatbuffers (or a differently versioned Bigfoot fork) is not compatible.
#ifndef FLATBUFFERS_BIGFOOT_VERSION
#error "This file requires Bigfoot's flatbuffers fork - stock flatbuffers is not compatible"
#endif
static_assert(FLATBUFFERS_BIGFOOT_VERSION == 1,
             "Non-compatible Bigfoot flatbuffers fork version included");

#include "System/UUID/UUID.hpp"
#include "Engine/Asset/Reference.hpp"
#include "Engine/Asset/Reference_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;

}  // namespace Bigfoot
}  // namespace Flat

namespace Bigfoot {
class AssetA;
}  // namespace Bigfoot

namespace flatbuffers {
Flat::Bigfoot::HardReference PackHardReferenceAssetA(const ::Bigfoot::HardReference<::Bigfoot::AssetA>& p_asset);
::Bigfoot::HardReference<::Bigfoot::AssetA> UnPackHardReferenceAssetA(const Flat::Bigfoot::HardReference& p_asset);
Flat::Bigfoot::SoftReference PackSoftReferenceAssetA(const ::Bigfoot::SoftReference<::Bigfoot::AssetA>& p_asset);
::Bigfoot::SoftReference<::Bigfoot::AssetA> UnPackSoftReferenceAssetA(const Flat::Bigfoot::SoftReference& p_asset);
}  // namespace flatbuffers

namespace Flat {
namespace Bigfoot {

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> ref_a{};
  eastl::vector<::Bigfoot::SoftReference<::Bigfoot::AssetA>> refs_a{};
};

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_REF_A = 4,
    VT_REFS_A = 6
  };
  const Flat::Bigfoot::HardReference *ref_a() const {
    return GetStruct<const Flat::Bigfoot::HardReference *>(VT_REF_A);
  }
  const ::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *> *refs_a() const {
    return GetPointer<const ::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *> *>(VT_REFS_A);
  }
  template <bool B = false>
  bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
    return VerifyTableStart(verifier) &&
           VerifyField<Flat::Bigfoot::HardReference>(verifier, VT_REF_A, 1) &&
           VerifyOffset(verifier, VT_REFS_A) &&
           verifier.VerifyVector(refs_a()) &&
           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_ref_a(const Flat::Bigfoot::HardReference *ref_a) {
    fbb_.AddStruct(AssetB::VT_REF_A, ref_a);
  }
  void add_refs_a(::flatbuffers::Offset<::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *>> refs_a) {
    fbb_.AddOffset(AssetB::VT_REFS_A, refs_a);
  }
  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 *ref_a = nullptr,
    ::flatbuffers::Offset<::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *>> refs_a = 0) {
  AssetBBuilder builder_(_fbb);
  builder_.add_refs_a(refs_a);
  builder_.add_ref_a(ref_a);
  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 = ref_a(); if (_e) _o->ref_a = ::flatbuffers::UnPackHardReferenceAssetA(*_e); }
  { auto _e = refs_a(); if (_e) { _o->refs_a.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->refs_a[_i] = ::flatbuffers::UnPackSoftReferenceAssetA(*_e->Get(_i)); } } else { _o->refs_a.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 _ref_a = ::flatbuffers::PackHardReferenceAssetA(_o->ref_a);
  auto _refs_a = _fbb.CreateVectorOfNativeStructs<Flat::Bigfoot::SoftReference, ::Bigfoot::SoftReference<::Bigfoot::AssetA>>(_o->refs_a.data(), _o->refs_a.size(), ::flatbuffers::PackSoftReferenceAssetA);
  return Flat::Bigfoot::CreateAssetB(
      _fbb,
      &_ref_a,
      _refs_a);
}

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

namespace flatbuffers {
#ifndef FLATBUFFERS_BIGFOOT_REF_HARDREFERENCEASSETA
#define FLATBUFFERS_BIGFOOT_REF_HARDREFERENCEASSETA
inline Flat::Bigfoot::HardReference PackHardReferenceAssetA(const ::Bigfoot::HardReference<::Bigfoot::AssetA>& p_asset) { return {Pack(p_asset.GetUUID())}; }
inline ::Bigfoot::HardReference<::Bigfoot::AssetA> UnPackHardReferenceAssetA(const Flat::Bigfoot::HardReference& p_asset) { return {UnPack(p_asset.uuid())}; }
#endif  // FLATBUFFERS_BIGFOOT_REF_HARDREFERENCEASSETA
#ifndef FLATBUFFERS_BIGFOOT_REF_SOFTREFERENCEASSETA
#define FLATBUFFERS_BIGFOOT_REF_SOFTREFERENCEASSETA
inline Flat::Bigfoot::SoftReference PackSoftReferenceAssetA(const ::Bigfoot::SoftReference<::Bigfoot::AssetA>& p_asset) { return {Pack(p_asset.GetUUID())}; }
inline ::Bigfoot::SoftReference<::Bigfoot::AssetA> UnPackSoftReferenceAssetA(const Flat::Bigfoot::SoftReference& p_asset) { return {UnPack(p_asset.uuid())}; }
#endif  // FLATBUFFERS_BIGFOOT_REF_SOFTREFERENCEASSETA
}  // namespace flatbuffers

#endif  // FLATBUFFERS_GENERATED_ASSETB_FLAT_BIGFOOT_H_
