diff --git a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetContainer.hpp b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetContainer.hpp index 89e03bd..a52b750 100644 --- a/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetContainer.hpp +++ b/Bigfoot/Sources/Engine/Include/Engine/BigFile/Asset/AssetContainer.hpp @@ -100,16 +100,6 @@ class AssetContainer // We use a segmented_map here to keep stable references ankerl::unordered_dense::segmented_map m_assets; }; - -template -class HardRef -{ -}; - -template -class SoftRef -{ -}; } // namespace Bigfoot #endif diff --git a/Bigfoot/Sources/System/CMakeLists.txt b/Bigfoot/Sources/System/CMakeLists.txt index 98d4eff..c41e1c9 100644 --- a/Bigfoot/Sources/System/CMakeLists.txt +++ b/Bigfoot/Sources/System/CMakeLists.txt @@ -22,7 +22,6 @@ bigfoot_create_logger() target_compile_definitions(${PROJECT_NAME} PUBLIC $<$:QUILL_NO_EXCEPTIONS> - $<$:QUILL_DISABLE_NON_PREFIXED_MACROS> - MI_SHARED_LIB ) + $<$:QUILL_DISABLE_NON_PREFIXED_MACROS>) set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/MimallocImpl.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) diff --git a/Bigfoot/Sources/System/Log/Log.cpp b/Bigfoot/Sources/System/Log/Log.cpp index ea0635e..56c3715 100644 --- a/Bigfoot/Sources/System/Log/Log.cpp +++ b/Bigfoot/Sources/System/Log/Log.cpp @@ -91,6 +91,8 @@ void Log::Flush() Log::~Log() { + Flush(); + for (quill::Logger* logger: quill::Frontend::get_all_loggers()) { quill::Frontend::remove_logger(logger); diff --git a/Bigfoot/Tests/Engine/BigFile/BigFile.cpp b/Bigfoot/Tests/Engine/BigFile/BigFile.cpp index 0284633..5156bdc 100644 --- a/Bigfoot/Tests/Engine/BigFile/BigFile.cpp +++ b/Bigfoot/Tests/Engine/BigFile/BigFile.cpp @@ -16,7 +16,6 @@ #include #include -#include #include #include @@ -29,7 +28,8 @@ class BigFileFixture: public ::testing::Test void SetUp() override { BigFile::Request deleteHeader {m_bigFile, "DELETE FROM AssetHeader"}; - BigFile::Request deleteAsset {m_bigFile, "DELETE FROM AssetHeader"}; + BigFile::Request deleteAsset {m_bigFile, "DELETE FROM Asset"}; + BigFile::Request deleteDependencies {m_bigFile, "DELETE FROM AssetDependency"}; m_bigFile.BeginTransaction(); deleteHeader.Execute(); @@ -38,7 +38,6 @@ class BigFileFixture: public ::testing::Test } AssetAContainer m_assetAContainer; - AssetBContainer m_assetBContainer; BIGFOOT_NOT_OPTIMIZED_ONLY(Singleton::Lifetime m_loggerLifetime;) @@ -96,10 +95,12 @@ TEST_F(BigFileFixture, Lol) UUID uuid; UUID uuid2; + UUID uuid3; eastl::array blob {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {4}}; eastl::array blob2 {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {5}}; eastl::array blob3 {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {6}}; + eastl::array blob4 {std::byte {10}, std::byte {11}, std::byte {12}, std::byte {13}}; { BigFile::Request assetHeaderRequest { @@ -126,6 +127,28 @@ TEST_F(BigFileFixture, Lol) assetRequest2.Bind(1, static_cast>(uuid2)); assetRequest2.Bind(2, blob3); + BigFile::Request assetHeaderRequest3 { + m_bigFile, + "INSERT INTO AssetHeader (UUID, Name, TypeID, TypeName) VALUES(?, ?, ?, ?)"}; + assetHeaderRequest3.Bind(1, static_cast>(uuid3)); + assetHeaderRequest3.Bind(2, "Test3"); + assetHeaderRequest3.Bind(3, 42); + assetHeaderRequest3.Bind(4, "TypeTest"); + + BigFile::Request assetRequest3 {m_bigFile, "INSERT INTO Asset (UUID, Asset) VALUES(?, ?)"}; + assetRequest3.Bind(1, static_cast>(uuid3)); + assetRequest3.Bind(2, blob4); + + BigFile::Request assetDependency {m_bigFile, + "INSERT INTO AssetDependency (AssetUUID, DependsOnUUID) VALUES(?, ?)"}; + assetDependency.Bind(1, static_cast>(uuid)); + assetDependency.Bind(2, static_cast>(uuid2)); + + BigFile::Request assetDependency2 {m_bigFile, + "INSERT INTO AssetDependency (AssetUUID, DependsOnUUID) VALUES(?, ?)"}; + assetDependency2.Bind(1, static_cast>(uuid)); + assetDependency2.Bind(2, static_cast>(uuid3)); + m_bigFile.BeginTransaction(); [[maybe_unused]] std::uint32_t assetHeaderChangedCount = assetHeaderRequest.Execute(); @@ -137,6 +160,16 @@ TEST_F(BigFileFixture, Lol) [[maybe_unused]] std::uint32_t assetChangedCount2 = assetRequest2.Execute(); + [[maybe_unused]] + std::uint32_t assetHeaderChangedCount3 = assetHeaderRequest3.Execute(); + [[maybe_unused]] + std::uint32_t assetChangedCount3 = assetRequest3.Execute(); + + [[maybe_unused]] + std::uint32_t assetDependencyChangedCount = assetDependency.Execute(); + [[maybe_unused]] + std::uint32_t assetDependencyChangedCount2 = assetDependency2.Execute(); + m_bigFile.CommitTransaction(); } @@ -205,6 +238,43 @@ TEST_F(BigFileFixture, Lol) const std::uint32_t microsecond = modificationTime.Microsecond(); } } + + { + BigFile::Request getDependency { + m_bigFile, + "SELECT h.* FROM AssetHeader h JOIN AssetDependency d ON h.UUID = d.DependsOnUUID WHERE d.AssetUUID = ?"}; + getDependency.Bind(1, static_cast>(uuid)); + + { + [[maybe_unused]] + const bool get = getDependency.Step(); + + auto test = static_cast>(getDependency.Get(0)); + + UUID dependency {std::span {test.begin(), test.end()}}; + EXPECT_EQ(dependency, uuid3); + } + + { + [[maybe_unused]] + const bool get = getDependency.Step(); + + auto test = static_cast>(getDependency.Get(0)); + + UUID dependency {std::span {test.begin(), test.end()}}; + EXPECT_EQ(dependency, uuid2); + } + } + + { + BigFile::Request getDependency { + m_bigFile, + "SELECT h.* FROM AssetHeader h JOIN AssetDependency d ON h.UUID = d.DependsOnUUID WHERE d.AssetUUID = ?"}; + getDependency.Bind(1, static_cast>(uuid2)); + + const bool get = getDependency.Step(); + EXPECT_FALSE(get); + } } } // namespace Bigfoot diff --git a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.fbs b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.fbs index 05e85ab..930a130 100644 --- a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.fbs +++ b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.fbs @@ -2,16 +2,6 @@ include "Engine/BigFile/Asset/AssetHeader.fbs"; namespace Bigfoot.Flat; -struct AssetAHardRef (native_type: "::Bigfoot::HardRef<::Bigfoot::AssetA>") -{ - uuid: UUID; -} - -struct AssetASoftRef (native_type: "::Bigfoot::SoftRef<::Bigfoot::AssetA>") -{ - uuid: UUID; -} - table AssetA { asset_header: AssetHeader; diff --git a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.fbs_generated.hpp b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.fbs_generated.hpp index 0e7aa3a..72f6e9d 100644 --- a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.fbs_generated.hpp +++ b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.fbs_generated.hpp @@ -11,31 +11,18 @@ namespace Bigfoot { - inline constexpr eastl::array g_AssetA_fbs = { + inline constexpr eastl::array g_AssetA_fbs = { std::byte{0x69}, std::byte{0x6E}, std::byte{0x63}, std::byte{0x6C}, std::byte{0x75}, std::byte{0x64}, std::byte{0x65}, std::byte{0x20}, std::byte{0x22}, std::byte{0x45}, std::byte{0x6E}, std::byte{0x67}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x46}, std::byte{0x69}, std::byte{0x6C}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x2F}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x48}, std::byte{0x65}, std::byte{0x61}, std::byte{0x64}, std::byte{0x65}, std::byte{0x72}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x22}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x6E}, std::byte{0x61}, std::byte{0x6D}, std::byte{0x65}, std::byte{0x73}, std::byte{0x70}, std::byte{0x61}, std::byte{0x63}, std::byte{0x65}, std::byte{0x20}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, - std::byte{0x6F}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x46}, std::byte{0x6C}, std::byte{0x61}, std::byte{0x74}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x73}, std::byte{0x74}, std::byte{0x72}, std::byte{0x75}, std::byte{0x63}, std::byte{0x74}, - std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x41}, std::byte{0x48}, std::byte{0x61}, std::byte{0x72}, std::byte{0x64}, std::byte{0x52}, std::byte{0x65}, std::byte{0x66}, std::byte{0x20}, std::byte{0x28}, - std::byte{0x6E}, std::byte{0x61}, std::byte{0x74}, std::byte{0x69}, std::byte{0x76}, std::byte{0x65}, std::byte{0x5F}, std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x22}, std::byte{0x3A}, std::byte{0x3A}, - std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x3A}, std::byte{0x3A}, std::byte{0x48}, std::byte{0x61}, std::byte{0x72}, std::byte{0x64}, std::byte{0x52}, std::byte{0x65}, std::byte{0x66}, - std::byte{0x3C}, std::byte{0x3A}, std::byte{0x3A}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x3A}, std::byte{0x3A}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, - std::byte{0x74}, std::byte{0x41}, std::byte{0x3E}, std::byte{0x22}, std::byte{0x29}, std::byte{0x0A}, std::byte{0x7B}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x75}, std::byte{0x75}, std::byte{0x69}, std::byte{0x64}, - std::byte{0x3A}, std::byte{0x20}, std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x7D}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x73}, std::byte{0x74}, std::byte{0x72}, std::byte{0x75}, std::byte{0x63}, - std::byte{0x74}, std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x41}, std::byte{0x53}, std::byte{0x6F}, std::byte{0x66}, std::byte{0x74}, std::byte{0x52}, std::byte{0x65}, std::byte{0x66}, std::byte{0x20}, - std::byte{0x28}, std::byte{0x6E}, std::byte{0x61}, std::byte{0x74}, std::byte{0x69}, std::byte{0x76}, std::byte{0x65}, std::byte{0x5F}, std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x22}, std::byte{0x3A}, - std::byte{0x3A}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x3A}, std::byte{0x3A}, std::byte{0x53}, std::byte{0x6F}, std::byte{0x66}, std::byte{0x74}, std::byte{0x52}, std::byte{0x65}, - std::byte{0x66}, std::byte{0x3C}, std::byte{0x3A}, std::byte{0x3A}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x3A}, std::byte{0x3A}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, - std::byte{0x65}, std::byte{0x74}, std::byte{0x41}, std::byte{0x3E}, std::byte{0x22}, std::byte{0x29}, std::byte{0x0A}, std::byte{0x7B}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x75}, std::byte{0x75}, std::byte{0x69}, - std::byte{0x64}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x7D}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x74}, std::byte{0x61}, std::byte{0x62}, std::byte{0x6C}, - std::byte{0x65}, std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x41}, std::byte{0x0A}, std::byte{0x7B}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x61}, - std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x5F}, std::byte{0x68}, std::byte{0x65}, std::byte{0x61}, std::byte{0x64}, std::byte{0x65}, std::byte{0x72}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, - std::byte{0x65}, std::byte{0x74}, std::byte{0x48}, std::byte{0x65}, std::byte{0x61}, std::byte{0x64}, std::byte{0x65}, std::byte{0x72}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x68}, - std::byte{0x65}, std::byte{0x61}, std::byte{0x6C}, std::byte{0x74}, std::byte{0x68}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x75}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x74}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, - std::byte{0x20}, std::byte{0x6D}, std::byte{0x61}, std::byte{0x6E}, std::byte{0x61}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x75}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x74}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x7D}, std::byte{0x0A}, std::byte{0x0A}, - std::byte{0x72}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x5F}, std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x41}, - std::byte{0x3B} + std::byte{0x6F}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x46}, std::byte{0x6C}, std::byte{0x61}, std::byte{0x74}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x74}, std::byte{0x61}, std::byte{0x62}, std::byte{0x6C}, std::byte{0x65}, std::byte{0x20}, + std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x41}, std::byte{0x0A}, std::byte{0x7B}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x61}, std::byte{0x73}, std::byte{0x73}, + std::byte{0x65}, std::byte{0x74}, std::byte{0x5F}, std::byte{0x68}, std::byte{0x65}, std::byte{0x61}, std::byte{0x64}, std::byte{0x65}, std::byte{0x72}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, + std::byte{0x48}, std::byte{0x65}, std::byte{0x61}, std::byte{0x64}, std::byte{0x65}, std::byte{0x72}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x68}, std::byte{0x65}, std::byte{0x61}, + std::byte{0x6C}, std::byte{0x74}, std::byte{0x68}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x75}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x74}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x6D}, + std::byte{0x61}, std::byte{0x6E}, std::byte{0x61}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x75}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x74}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x7D}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x72}, std::byte{0x6F}, + std::byte{0x6F}, std::byte{0x74}, std::byte{0x5F}, std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x41}, std::byte{0x3B} }; } // namespace Bigfoot diff --git a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA_generated.hpp b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA_generated.hpp index d56a00b..e693171 100644 --- a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA_generated.hpp +++ b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA_generated.hpp @@ -24,76 +24,12 @@ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 && namespace Bigfoot { namespace Flat { -struct AssetAHardRef; - -struct AssetASoftRef; - struct AssetA; struct AssetABuilder; struct AssetAT; -inline const ::flatbuffers::TypeTable *AssetAHardRefTypeTable(); - -inline const ::flatbuffers::TypeTable *AssetASoftRefTypeTable(); - inline const ::flatbuffers::TypeTable *AssetATypeTable(); -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) AssetAHardRef FLATBUFFERS_FINAL_CLASS { - private: - Bigfoot::Flat::UUID uuid_; - - public: - struct Traits; - static const ::flatbuffers::TypeTable *MiniReflectTypeTable() { - return AssetAHardRefTypeTable(); - } - static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { - return "Bigfoot.Flat.AssetAHardRef"; - } - AssetAHardRef() - : uuid_() { - } - AssetAHardRef(const Bigfoot::Flat::UUID &_uuid) - : uuid_(_uuid) { - } - const Bigfoot::Flat::UUID &uuid() const { - return uuid_; - } -}; -FLATBUFFERS_STRUCT_END(AssetAHardRef, 16); - -struct AssetAHardRef::Traits { - using type = AssetAHardRef; -}; - -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) AssetASoftRef FLATBUFFERS_FINAL_CLASS { - private: - Bigfoot::Flat::UUID uuid_; - - public: - struct Traits; - static const ::flatbuffers::TypeTable *MiniReflectTypeTable() { - return AssetASoftRefTypeTable(); - } - static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { - return "Bigfoot.Flat.AssetASoftRef"; - } - AssetASoftRef() - : uuid_() { - } - AssetASoftRef(const Bigfoot::Flat::UUID &_uuid) - : uuid_(_uuid) { - } - const Bigfoot::Flat::UUID &uuid() const { - return uuid_; - } -}; -FLATBUFFERS_STRUCT_END(AssetASoftRef, 16); - -struct AssetASoftRef::Traits { - using type = AssetASoftRef; -}; - struct AssetAT : public ::flatbuffers::NativeTable { typedef AssetA TableType; static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { @@ -234,40 +170,6 @@ inline ::flatbuffers::Offset AssetA::Pack(::flatbuffers::FlatBufferBuild _mana); } -inline const ::flatbuffers::TypeTable *AssetAHardRefTypeTable() { - static const ::flatbuffers::TypeCode type_codes[] = { - { ::flatbuffers::ET_SEQUENCE, 0, 0 } - }; - static const ::flatbuffers::TypeFunction type_refs[] = { - Bigfoot::Flat::UUIDTypeTable - }; - static const int64_t values[] = { 0, 16 }; - static const char * const names[] = { - "uuid" - }; - static const ::flatbuffers::TypeTable tt = { - ::flatbuffers::ST_STRUCT, 1, type_codes, type_refs, nullptr, values, names - }; - return &tt; -} - -inline const ::flatbuffers::TypeTable *AssetASoftRefTypeTable() { - static const ::flatbuffers::TypeCode type_codes[] = { - { ::flatbuffers::ET_SEQUENCE, 0, 0 } - }; - static const ::flatbuffers::TypeFunction type_refs[] = { - Bigfoot::Flat::UUIDTypeTable - }; - static const int64_t values[] = { 0, 16 }; - static const char * const names[] = { - "uuid" - }; - static const ::flatbuffers::TypeTable tt = { - ::flatbuffers::ST_STRUCT, 1, type_codes, type_refs, nullptr, values, names - }; - return &tt; -} - inline const ::flatbuffers::TypeTable *AssetATypeTable() { static const ::flatbuffers::TypeCode type_codes[] = { { ::flatbuffers::ET_SEQUENCE, 0, 0 }, diff --git a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetB.fbs b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetB.fbs deleted file mode 100644 index f35db17..0000000 --- a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetB.fbs +++ /dev/null @@ -1,22 +0,0 @@ -include "EngineTests/BigFile/Asset/AssetA.fbs"; - -namespace Bigfoot.Flat; - -struct AssetBHardRef (native_type: "::Bigfoot::HardRef<::Bigfoot::AssetB>") -{ - uuid: UUID; -} - -struct AssetBSoftRef (native_type: "::Bigfoot::SoftRef<::Bigfoot::AssetB>") -{ - uuid: UUID; -} - -table AssetB -{ - asset_header: AssetHeader; - - asset_a_hard_ref: AssetAHardRef (native_inline); -} - -root_type AssetB; \ No newline at end of file diff --git a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetB.fbs_generated.hpp b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetB.fbs_generated.hpp deleted file mode 100644 index 94ebcbf..0000000 --- a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetB.fbs_generated.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Auto-generated header from: AssetB.fbs - * Generated by Bin2CPP - * - * DO NOT TOUCH - */ -#ifndef ASSETB_FBS_HPP -#define ASSETB_FBS_HPP -#include -#include - -namespace Bigfoot -{ - inline constexpr eastl::array g_AssetB_fbs = { - std::byte{0x69}, std::byte{0x6E}, std::byte{0x63}, std::byte{0x6C}, std::byte{0x75}, std::byte{0x64}, std::byte{0x65}, std::byte{0x20}, std::byte{0x22}, std::byte{0x45}, std::byte{0x6E}, std::byte{0x67}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x65}, std::byte{0x54}, - std::byte{0x65}, std::byte{0x73}, std::byte{0x74}, std::byte{0x73}, std::byte{0x2F}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x46}, std::byte{0x69}, std::byte{0x6C}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, - std::byte{0x65}, std::byte{0x74}, std::byte{0x2F}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x41}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x22}, std::byte{0x3B}, std::byte{0x0A}, - std::byte{0x0A}, std::byte{0x6E}, std::byte{0x61}, std::byte{0x6D}, std::byte{0x65}, std::byte{0x73}, std::byte{0x70}, std::byte{0x61}, std::byte{0x63}, std::byte{0x65}, std::byte{0x20}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, - std::byte{0x6F}, std::byte{0x74}, std::byte{0x2E}, std::byte{0x46}, std::byte{0x6C}, std::byte{0x61}, std::byte{0x74}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x73}, std::byte{0x74}, std::byte{0x72}, std::byte{0x75}, std::byte{0x63}, std::byte{0x74}, - std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x42}, std::byte{0x48}, std::byte{0x61}, std::byte{0x72}, std::byte{0x64}, std::byte{0x52}, std::byte{0x65}, std::byte{0x66}, std::byte{0x20}, std::byte{0x28}, - std::byte{0x6E}, std::byte{0x61}, std::byte{0x74}, std::byte{0x69}, std::byte{0x76}, std::byte{0x65}, std::byte{0x5F}, std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x22}, std::byte{0x3A}, std::byte{0x3A}, - std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x3A}, std::byte{0x3A}, std::byte{0x48}, std::byte{0x61}, std::byte{0x72}, std::byte{0x64}, std::byte{0x52}, std::byte{0x65}, std::byte{0x66}, - std::byte{0x3C}, std::byte{0x3A}, std::byte{0x3A}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x3A}, std::byte{0x3A}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, - std::byte{0x74}, std::byte{0x42}, std::byte{0x3E}, std::byte{0x22}, std::byte{0x29}, std::byte{0x0A}, std::byte{0x7B}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x75}, std::byte{0x75}, std::byte{0x69}, std::byte{0x64}, - std::byte{0x3A}, std::byte{0x20}, std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x7D}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x73}, std::byte{0x74}, std::byte{0x72}, std::byte{0x75}, std::byte{0x63}, - std::byte{0x74}, std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x42}, std::byte{0x53}, std::byte{0x6F}, std::byte{0x66}, std::byte{0x74}, std::byte{0x52}, std::byte{0x65}, std::byte{0x66}, std::byte{0x20}, - std::byte{0x28}, std::byte{0x6E}, std::byte{0x61}, std::byte{0x74}, std::byte{0x69}, std::byte{0x76}, std::byte{0x65}, std::byte{0x5F}, std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x22}, std::byte{0x3A}, - std::byte{0x3A}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x3A}, std::byte{0x3A}, std::byte{0x53}, std::byte{0x6F}, std::byte{0x66}, std::byte{0x74}, std::byte{0x52}, std::byte{0x65}, - std::byte{0x66}, std::byte{0x3C}, std::byte{0x3A}, std::byte{0x3A}, std::byte{0x42}, std::byte{0x69}, std::byte{0x67}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x3A}, std::byte{0x3A}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, - std::byte{0x65}, std::byte{0x74}, std::byte{0x42}, std::byte{0x3E}, std::byte{0x22}, std::byte{0x29}, std::byte{0x0A}, std::byte{0x7B}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x75}, std::byte{0x75}, std::byte{0x69}, - std::byte{0x64}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x7D}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x74}, std::byte{0x61}, std::byte{0x62}, std::byte{0x6C}, - std::byte{0x65}, std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x42}, std::byte{0x0A}, std::byte{0x7B}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x61}, - std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x5F}, std::byte{0x68}, std::byte{0x65}, std::byte{0x61}, std::byte{0x64}, std::byte{0x65}, std::byte{0x72}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, - std::byte{0x65}, std::byte{0x74}, std::byte{0x48}, std::byte{0x65}, std::byte{0x61}, std::byte{0x64}, std::byte{0x65}, std::byte{0x72}, std::byte{0x3B}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x61}, - std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x5F}, std::byte{0x61}, std::byte{0x5F}, std::byte{0x68}, std::byte{0x61}, std::byte{0x72}, std::byte{0x64}, std::byte{0x5F}, std::byte{0x72}, std::byte{0x65}, std::byte{0x66}, std::byte{0x3A}, - std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x41}, std::byte{0x48}, std::byte{0x61}, std::byte{0x72}, std::byte{0x64}, std::byte{0x52}, std::byte{0x65}, std::byte{0x66}, std::byte{0x20}, std::byte{0x28}, - std::byte{0x6E}, std::byte{0x61}, std::byte{0x74}, std::byte{0x69}, std::byte{0x76}, std::byte{0x65}, std::byte{0x5F}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x6C}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x65}, std::byte{0x29}, std::byte{0x3B}, std::byte{0x0A}, - std::byte{0x7D}, std::byte{0x0A}, std::byte{0x0A}, std::byte{0x72}, std::byte{0x6F}, std::byte{0x6F}, std::byte{0x74}, std::byte{0x5F}, std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x20}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, - std::byte{0x65}, std::byte{0x74}, std::byte{0x42}, std::byte{0x3B} - }; - -} // namespace Bigfoot - -#endif // ASSETB_FBS_HPP diff --git a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetB.hpp b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetB.hpp deleted file mode 100644 index 863f058..0000000 --- a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetB.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/********************************************************************* - * \file AssetB.hpp - * - * \author Romain BOULLARD - * \date February 2026 - *********************************************************************/ -#ifndef BIGFOOT_ENGINETESTS_ASSETB_HPP -#define BIGFOOT_ENGINETESTS_ASSETB_HPP -#include - -#include -#include - -namespace Bigfoot -{ -class AssetB -{ - public: - using FLAT_ASSET = Flat::AssetB; - - AssetB(FlatAssetWrapper* p_flatAsset): - m_flatAsset(p_flatAsset) - { - } - - AssetB(const AssetB& p_assetB) = default; - AssetB(AssetB&& p_assetB) = default; - - [[nodiscard]] - HardRef Health() - { - return m_flatAsset->Asset().asset_a_hard_ref; - } - - [[nodiscard]] - Flat::AssetHeaderT* AssetHeader() - { - return m_flatAsset->Asset().asset_header.get(); - } - - [[nodiscard]] - const Flat::AssetHeaderT* AssetHeader() const - { - return m_flatAsset->Asset().asset_header.get(); - } - - ~AssetB() = default; - - AssetB& operator=(const AssetB& p_assetB) = default; - AssetB& operator=(AssetB&& p_assetB) = default; - - private: - FlatAssetWrapper* m_flatAsset; -}; - -using AssetBContainer = AssetContainer; -} // namespace Bigfoot - -#endif diff --git a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetB_generated.hpp b/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetB_generated.hpp deleted file mode 100644 index 282bfec..0000000 --- a/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetB_generated.hpp +++ /dev/null @@ -1,321 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - - -#ifndef FLATBUFFERS_GENERATED_ASSETB_BIGFOOT_FLAT_H_ -#define FLATBUFFERS_GENERATED_ASSETB_BIGFOOT_FLAT_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/BigFile/Asset/AssetTypeID.hpp" -#include "Engine/BigFile/Asset/AssetTypeID.hpp" -#include "System/UUID/UUID.hpp" -#include "EngineTests/BigFile/Asset/AssetA_generated.hpp" - -#include "EASTL/unique_ptr.h" -#include "EASTL/string.h" - -namespace Bigfoot { -namespace Flat { - -struct AssetBHardRef; - -struct AssetBSoftRef; - -struct AssetB; -struct AssetBBuilder; -struct AssetBT; - -inline const ::flatbuffers::TypeTable *AssetBHardRefTypeTable(); - -inline const ::flatbuffers::TypeTable *AssetBSoftRefTypeTable(); - -inline const ::flatbuffers::TypeTable *AssetBTypeTable(); - -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) AssetBHardRef FLATBUFFERS_FINAL_CLASS { - private: - Bigfoot::Flat::UUID uuid_; - - public: - struct Traits; - static const ::flatbuffers::TypeTable *MiniReflectTypeTable() { - return AssetBHardRefTypeTable(); - } - static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { - return "Bigfoot.Flat.AssetBHardRef"; - } - AssetBHardRef() - : uuid_() { - } - AssetBHardRef(const Bigfoot::Flat::UUID &_uuid) - : uuid_(_uuid) { - } - const Bigfoot::Flat::UUID &uuid() const { - return uuid_; - } -}; -FLATBUFFERS_STRUCT_END(AssetBHardRef, 16); - -struct AssetBHardRef::Traits { - using type = AssetBHardRef; -}; - -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) AssetBSoftRef FLATBUFFERS_FINAL_CLASS { - private: - Bigfoot::Flat::UUID uuid_; - - public: - struct Traits; - static const ::flatbuffers::TypeTable *MiniReflectTypeTable() { - return AssetBSoftRefTypeTable(); - } - static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { - return "Bigfoot.Flat.AssetBSoftRef"; - } - AssetBSoftRef() - : uuid_() { - } - AssetBSoftRef(const Bigfoot::Flat::UUID &_uuid) - : uuid_(_uuid) { - } - const Bigfoot::Flat::UUID &uuid() const { - return uuid_; - } -}; -FLATBUFFERS_STRUCT_END(AssetBSoftRef, 16); - -struct AssetBSoftRef::Traits { - using type = AssetBSoftRef; -}; - -struct AssetBT : public ::flatbuffers::NativeTable { - typedef AssetB TableType; - static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() { - return "Bigfoot.Flat.AssetBT"; - } - eastl::unique_ptr asset_header{}; - ::Bigfoot::HardRef<::Bigfoot::AssetA> asset_a_hard_ref{}; - AssetBT() = default; - AssetBT(const AssetBT &o); - AssetBT(AssetBT&&) FLATBUFFERS_NOEXCEPT = default; - AssetBT &operator=(AssetBT o) FLATBUFFERS_NOEXCEPT; -}; - -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 "Bigfoot.Flat.AssetB"; - } - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ASSET_HEADER = 4, - VT_ASSET_A_HARD_REF = 6 - }; - const Bigfoot::Flat::AssetHeader *asset_header() const { - return GetPointer(VT_ASSET_HEADER); - } - const Bigfoot::Flat::AssetAHardRef *asset_a_hard_ref() const { - return GetStruct(VT_ASSET_A_HARD_REF); - } - template - bool Verify(::flatbuffers::VerifierTemplate &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_ASSET_HEADER) && - verifier.VerifyTable(asset_header()) && - VerifyField(verifier, VT_ASSET_A_HARD_REF, 1) && - 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 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_header(::flatbuffers::Offset asset_header) { - fbb_.AddOffset(AssetB::VT_ASSET_HEADER, asset_header); - } - void add_asset_a_hard_ref(const Bigfoot::Flat::AssetAHardRef *asset_a_hard_ref) { - fbb_.AddStruct(AssetB::VT_ASSET_A_HARD_REF, asset_a_hard_ref); - } - explicit AssetBBuilder(::flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } - ::flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = ::flatbuffers::Offset(end); - return o; - } -}; - -inline ::flatbuffers::Offset CreateAssetB( - ::flatbuffers::FlatBufferBuilder &_fbb, - ::flatbuffers::Offset asset_header = 0, - const Bigfoot::Flat::AssetAHardRef *asset_a_hard_ref = nullptr) { - AssetBBuilder builder_(_fbb); - builder_.add_asset_a_hard_ref(asset_a_hard_ref); - builder_.add_asset_header(asset_header); - return builder_.Finish(); -} - -struct AssetB::Traits { - using type = AssetB; - static auto constexpr Create = CreateAssetB; -}; - -::flatbuffers::Offset CreateAssetB(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr); - -inline AssetBT::AssetBT(const AssetBT &o) - : asset_header((o.asset_header) ? new Bigfoot::Flat::AssetHeaderT(*o.asset_header) : nullptr), - asset_a_hard_ref(o.asset_a_hard_ref) { -} - -inline AssetBT &AssetBT::operator=(AssetBT o) FLATBUFFERS_NOEXCEPT { - std::swap(asset_header, o.asset_header); - std::swap(asset_a_hard_ref, o.asset_a_hard_ref); - return *this; -} - -inline AssetBT *AssetB::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const { - auto _o = std::make_unique(); - 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_header(); if (_e) { if(_o->asset_header) { _e->UnPackTo(_o->asset_header.get(), _resolver); } else { _o->asset_header = eastl::unique_ptr(_e->UnPack(_resolver)); } } else if (_o->asset_header) { _o->asset_header.reset(); } } - { auto _e = asset_a_hard_ref(); if (_e) _o->asset_a_hard_ref = ::flatbuffers::UnPack(*_e); } -} - -inline ::flatbuffers::Offset CreateAssetB(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) { - return AssetB::Pack(_fbb, _o, _rehasher); -} - -inline ::flatbuffers::Offset 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_header = _o->asset_header ? CreateAssetHeader(_fbb, _o->asset_header.get(), _rehasher) : 0; - auto _asset_a_hard_ref = ::flatbuffers::Pack(_o->asset_a_hard_ref); - return Bigfoot::Flat::CreateAssetB( - _fbb, - _asset_header, - &_asset_a_hard_ref); -} - -inline const ::flatbuffers::TypeTable *AssetBHardRefTypeTable() { - static const ::flatbuffers::TypeCode type_codes[] = { - { ::flatbuffers::ET_SEQUENCE, 0, 0 } - }; - static const ::flatbuffers::TypeFunction type_refs[] = { - Bigfoot::Flat::UUIDTypeTable - }; - static const int64_t values[] = { 0, 16 }; - static const char * const names[] = { - "uuid" - }; - static const ::flatbuffers::TypeTable tt = { - ::flatbuffers::ST_STRUCT, 1, type_codes, type_refs, nullptr, values, names - }; - return &tt; -} - -inline const ::flatbuffers::TypeTable *AssetBSoftRefTypeTable() { - static const ::flatbuffers::TypeCode type_codes[] = { - { ::flatbuffers::ET_SEQUENCE, 0, 0 } - }; - static const ::flatbuffers::TypeFunction type_refs[] = { - Bigfoot::Flat::UUIDTypeTable - }; - static const int64_t values[] = { 0, 16 }; - static const char * const names[] = { - "uuid" - }; - static const ::flatbuffers::TypeTable tt = { - ::flatbuffers::ST_STRUCT, 1, type_codes, type_refs, nullptr, values, names - }; - return &tt; -} - -inline const ::flatbuffers::TypeTable *AssetBTypeTable() { - static const ::flatbuffers::TypeCode type_codes[] = { - { ::flatbuffers::ET_SEQUENCE, 0, 0 }, - { ::flatbuffers::ET_SEQUENCE, 0, 1 } - }; - static const ::flatbuffers::TypeFunction type_refs[] = { - Bigfoot::Flat::AssetHeaderTypeTable, - Bigfoot::Flat::AssetAHardRefTypeTable - }; - static const char * const names[] = { - "asset_header", - "asset_a_hard_ref" - }; - static const ::flatbuffers::TypeTable tt = { - ::flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; -} - -inline const Bigfoot::Flat::AssetB *GetAssetB(const void *buf) { - return ::flatbuffers::GetRoot(buf); -} - -inline const Bigfoot::Flat::AssetB *GetSizePrefixedAssetB(const void *buf) { - return ::flatbuffers::GetSizePrefixedRoot(buf); -} - -template -inline bool VerifyAssetBBuffer( - ::flatbuffers::VerifierTemplate &verifier) { - return verifier.template VerifyBuffer(nullptr); -} - -template -inline bool VerifySizePrefixedAssetBBuffer( - ::flatbuffers::VerifierTemplate &verifier) { - return verifier.template VerifySizePrefixedBuffer(nullptr); -} - -inline void FinishAssetBBuffer( - ::flatbuffers::FlatBufferBuilder &fbb, - ::flatbuffers::Offset root) { - fbb.Finish(root); -} - -inline void FinishSizePrefixedAssetBBuffer( - ::flatbuffers::FlatBufferBuilder &fbb, - ::flatbuffers::Offset root) { - fbb.FinishSizePrefixed(root); -} - -inline eastl::unique_ptr UnPackAssetB( - const void *buf, - const ::flatbuffers::resolver_function_t *res = nullptr) { - return eastl::unique_ptr(GetAssetB(buf)->UnPack(res)); -} - -inline eastl::unique_ptr UnPackSizePrefixedAssetB( - const void *buf, - const ::flatbuffers::resolver_function_t *res = nullptr) { - return eastl::unique_ptr(GetSizePrefixedAssetB(buf)->UnPack(res)); -} - -} // namespace Flat -} // namespace Bigfoot - -#endif // FLATBUFFERS_GENERATED_ASSETB_BIGFOOT_FLAT_H_