Asset dependencies
This commit is contained in:
@@ -100,16 +100,6 @@ class AssetContainer
|
|||||||
// We use a segmented_map here to keep stable references
|
// We use a segmented_map here to keep stable references
|
||||||
ankerl::unordered_dense::segmented_map<UUID, AssetHandle> m_assets;
|
ankerl::unordered_dense::segmented_map<UUID, AssetHandle> m_assets;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<BigfootAssetConcept ASSET>
|
|
||||||
class HardRef
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template<BigfootAssetConcept ASSET>
|
|
||||||
class SoftRef
|
|
||||||
{
|
|
||||||
};
|
|
||||||
} // namespace Bigfoot
|
} // namespace Bigfoot
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ bigfoot_create_logger()
|
|||||||
target_compile_definitions(${PROJECT_NAME}
|
target_compile_definitions(${PROJECT_NAME}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<$<CONFIG:Debug,RelWithDebInfo>:QUILL_NO_EXCEPTIONS>
|
$<$<CONFIG:Debug,RelWithDebInfo>:QUILL_NO_EXCEPTIONS>
|
||||||
$<$<CONFIG:Debug,RelWithDebInfo>:QUILL_DISABLE_NON_PREFIXED_MACROS>
|
$<$<CONFIG:Debug,RelWithDebInfo>:QUILL_DISABLE_NON_PREFIXED_MACROS>)
|
||||||
MI_SHARED_LIB )
|
|
||||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/MimallocImpl.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/MimallocImpl.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ void Log::Flush()
|
|||||||
|
|
||||||
Log::~Log()
|
Log::~Log()
|
||||||
{
|
{
|
||||||
|
Flush();
|
||||||
|
|
||||||
for (quill::Logger* logger: quill::Frontend::get_all_loggers())
|
for (quill::Logger* logger: quill::Frontend::get_all_loggers())
|
||||||
{
|
{
|
||||||
quill::Frontend::remove_logger(logger);
|
quill::Frontend::remove_logger(logger);
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
#include <Utils/TargetMacros.h>
|
#include <Utils/TargetMacros.h>
|
||||||
|
|
||||||
#include <EngineTests/BigFile/Asset/AssetA.hpp>
|
#include <EngineTests/BigFile/Asset/AssetA.hpp>
|
||||||
#include <EngineTests/BigFile/Asset/AssetB.hpp>
|
|
||||||
#include <EngineTests/BigFileInfo_generated.hpp>
|
#include <EngineTests/BigFileInfo_generated.hpp>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
@@ -29,7 +28,8 @@ class BigFileFixture: public ::testing::Test
|
|||||||
void SetUp() override
|
void SetUp() override
|
||||||
{
|
{
|
||||||
BigFile::Request deleteHeader {m_bigFile, "DELETE FROM AssetHeader"};
|
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();
|
m_bigFile.BeginTransaction();
|
||||||
deleteHeader.Execute();
|
deleteHeader.Execute();
|
||||||
@@ -38,7 +38,6 @@ class BigFileFixture: public ::testing::Test
|
|||||||
}
|
}
|
||||||
|
|
||||||
AssetAContainer m_assetAContainer;
|
AssetAContainer m_assetAContainer;
|
||||||
AssetBContainer m_assetBContainer;
|
|
||||||
|
|
||||||
BIGFOOT_NOT_OPTIMIZED_ONLY(Singleton<Log>::Lifetime m_loggerLifetime;)
|
BIGFOOT_NOT_OPTIMIZED_ONLY(Singleton<Log>::Lifetime m_loggerLifetime;)
|
||||||
|
|
||||||
@@ -96,10 +95,12 @@ TEST_F(BigFileFixture, Lol)
|
|||||||
|
|
||||||
UUID uuid;
|
UUID uuid;
|
||||||
UUID uuid2;
|
UUID uuid2;
|
||||||
|
UUID uuid3;
|
||||||
|
|
||||||
eastl::array<std::byte, 4> blob {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {4}};
|
eastl::array<std::byte, 4> blob {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {4}};
|
||||||
eastl::array<std::byte, 4> blob2 {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {5}};
|
eastl::array<std::byte, 4> blob2 {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {5}};
|
||||||
eastl::array<std::byte, 4> blob3 {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {6}};
|
eastl::array<std::byte, 4> blob3 {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {6}};
|
||||||
|
eastl::array<std::byte, 4> blob4 {std::byte {10}, std::byte {11}, std::byte {12}, std::byte {13}};
|
||||||
|
|
||||||
{
|
{
|
||||||
BigFile::Request assetHeaderRequest {
|
BigFile::Request assetHeaderRequest {
|
||||||
@@ -126,6 +127,28 @@ TEST_F(BigFileFixture, Lol)
|
|||||||
assetRequest2.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid2));
|
assetRequest2.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid2));
|
||||||
assetRequest2.Bind(2, blob3);
|
assetRequest2.Bind(2, blob3);
|
||||||
|
|
||||||
|
BigFile::Request assetHeaderRequest3 {
|
||||||
|
m_bigFile,
|
||||||
|
"INSERT INTO AssetHeader (UUID, Name, TypeID, TypeName) VALUES(?, ?, ?, ?)"};
|
||||||
|
assetHeaderRequest3.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(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<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid3));
|
||||||
|
assetRequest3.Bind(2, blob4);
|
||||||
|
|
||||||
|
BigFile::Request assetDependency {m_bigFile,
|
||||||
|
"INSERT INTO AssetDependency (AssetUUID, DependsOnUUID) VALUES(?, ?)"};
|
||||||
|
assetDependency.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
||||||
|
assetDependency.Bind(2, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid2));
|
||||||
|
|
||||||
|
BigFile::Request assetDependency2 {m_bigFile,
|
||||||
|
"INSERT INTO AssetDependency (AssetUUID, DependsOnUUID) VALUES(?, ?)"};
|
||||||
|
assetDependency2.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
||||||
|
assetDependency2.Bind(2, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid3));
|
||||||
|
|
||||||
m_bigFile.BeginTransaction();
|
m_bigFile.BeginTransaction();
|
||||||
[[maybe_unused]]
|
[[maybe_unused]]
|
||||||
std::uint32_t assetHeaderChangedCount = assetHeaderRequest.Execute();
|
std::uint32_t assetHeaderChangedCount = assetHeaderRequest.Execute();
|
||||||
@@ -137,6 +160,16 @@ TEST_F(BigFileFixture, Lol)
|
|||||||
[[maybe_unused]]
|
[[maybe_unused]]
|
||||||
std::uint32_t assetChangedCount2 = assetRequest2.Execute();
|
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();
|
m_bigFile.CommitTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,6 +238,43 @@ TEST_F(BigFileFixture, Lol)
|
|||||||
const std::uint32_t microsecond = modificationTime.Microsecond();
|
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<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
||||||
|
|
||||||
|
{
|
||||||
|
[[maybe_unused]]
|
||||||
|
const bool get = getDependency.Step();
|
||||||
|
|
||||||
|
auto test = static_cast<eastl::span<const std::byte>>(getDependency.Get(0));
|
||||||
|
|
||||||
|
UUID dependency {std::span<const std::byte, UUID::UUID_BYTE_SIZE> {test.begin(), test.end()}};
|
||||||
|
EXPECT_EQ(dependency, uuid3);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
[[maybe_unused]]
|
||||||
|
const bool get = getDependency.Step();
|
||||||
|
|
||||||
|
auto test = static_cast<eastl::span<const std::byte>>(getDependency.Get(0));
|
||||||
|
|
||||||
|
UUID dependency {std::span<const std::byte, UUID::UUID_BYTE_SIZE> {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<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid2));
|
||||||
|
|
||||||
|
const bool get = getDependency.Step();
|
||||||
|
EXPECT_FALSE(get);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Bigfoot
|
} // namespace Bigfoot
|
||||||
|
|||||||
@@ -2,16 +2,6 @@ include "Engine/BigFile/Asset/AssetHeader.fbs";
|
|||||||
|
|
||||||
namespace Bigfoot.Flat;
|
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
|
table AssetA
|
||||||
{
|
{
|
||||||
asset_header: AssetHeader;
|
asset_header: AssetHeader;
|
||||||
|
|||||||
@@ -11,31 +11,18 @@
|
|||||||
|
|
||||||
namespace Bigfoot
|
namespace Bigfoot
|
||||||
{
|
{
|
||||||
inline constexpr eastl::array<std::byte, 369> g_AssetA_fbs = {
|
inline constexpr eastl::array<std::byte, 175> 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{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{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{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{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{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{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{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{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{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{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{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{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{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{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{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{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{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{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}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Bigfoot
|
} // namespace Bigfoot
|
||||||
|
|||||||
@@ -24,76 +24,12 @@ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
|||||||
namespace Bigfoot {
|
namespace Bigfoot {
|
||||||
namespace Flat {
|
namespace Flat {
|
||||||
|
|
||||||
struct AssetAHardRef;
|
|
||||||
|
|
||||||
struct AssetASoftRef;
|
|
||||||
|
|
||||||
struct AssetA;
|
struct AssetA;
|
||||||
struct AssetABuilder;
|
struct AssetABuilder;
|
||||||
struct AssetAT;
|
struct AssetAT;
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *AssetAHardRefTypeTable();
|
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *AssetASoftRefTypeTable();
|
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *AssetATypeTable();
|
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 {
|
struct AssetAT : public ::flatbuffers::NativeTable {
|
||||||
typedef AssetA TableType;
|
typedef AssetA TableType;
|
||||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||||
@@ -234,40 +170,6 @@ inline ::flatbuffers::Offset<AssetA> AssetA::Pack(::flatbuffers::FlatBufferBuild
|
|||||||
_mana);
|
_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() {
|
inline const ::flatbuffers::TypeTable *AssetATypeTable() {
|
||||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
||||||
|
|||||||
@@ -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;
|
|
||||||
@@ -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 <EASTL/array.h>
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
inline constexpr eastl::array<std::byte, 388> 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
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
/*********************************************************************
|
|
||||||
* \file AssetB.hpp
|
|
||||||
*
|
|
||||||
* \author Romain BOULLARD
|
|
||||||
* \date February 2026
|
|
||||||
*********************************************************************/
|
|
||||||
#ifndef BIGFOOT_ENGINETESTS_ASSETB_HPP
|
|
||||||
#define BIGFOOT_ENGINETESTS_ASSETB_HPP
|
|
||||||
#include <Engine/BigFile/Asset/AssetContainer.hpp>
|
|
||||||
|
|
||||||
#include <EngineTests/BigFile/Asset/AssetA.hpp>
|
|
||||||
#include <EngineTests/BigFile/Asset/AssetB_generated.hpp>
|
|
||||||
|
|
||||||
namespace Bigfoot
|
|
||||||
{
|
|
||||||
class AssetB
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
using FLAT_ASSET = Flat::AssetB;
|
|
||||||
|
|
||||||
AssetB(FlatAssetWrapper<Flat::AssetB>* p_flatAsset):
|
|
||||||
m_flatAsset(p_flatAsset)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
AssetB(const AssetB& p_assetB) = default;
|
|
||||||
AssetB(AssetB&& p_assetB) = default;
|
|
||||||
|
|
||||||
[[nodiscard]]
|
|
||||||
HardRef<AssetA> 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<Flat::AssetB>* m_flatAsset;
|
|
||||||
};
|
|
||||||
|
|
||||||
using AssetBContainer = AssetContainer<AssetB>;
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -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<Bigfoot::Flat::AssetHeaderT> 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<const Bigfoot::Flat::AssetHeader *>(VT_ASSET_HEADER);
|
|
||||||
}
|
|
||||||
const Bigfoot::Flat::AssetAHardRef *asset_a_hard_ref() const {
|
|
||||||
return GetStruct<const Bigfoot::Flat::AssetAHardRef *>(VT_ASSET_A_HARD_REF);
|
|
||||||
}
|
|
||||||
template <bool B = false>
|
|
||||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
|
||||||
return VerifyTableStart(verifier) &&
|
|
||||||
VerifyOffset(verifier, VT_ASSET_HEADER) &&
|
|
||||||
verifier.VerifyTable(asset_header()) &&
|
|
||||||
VerifyField<Bigfoot::Flat::AssetAHardRef>(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<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_header(::flatbuffers::Offset<Bigfoot::Flat::AssetHeader> 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<AssetB> Finish() {
|
|
||||||
const auto end = fbb_.EndTable(start_);
|
|
||||||
auto o = ::flatbuffers::Offset<AssetB>(end);
|
|
||||||
return o;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
inline ::flatbuffers::Offset<AssetB> CreateAssetB(
|
|
||||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
|
||||||
::flatbuffers::Offset<Bigfoot::Flat::AssetHeader> 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<AssetB> 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<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_header(); if (_e) { if(_o->asset_header) { _e->UnPackTo(_o->asset_header.get(), _resolver); } else { _o->asset_header = eastl::unique_ptr<Bigfoot::Flat::AssetHeaderT>(_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<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_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<Bigfoot::Flat::AssetB>(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline const Bigfoot::Flat::AssetB *GetSizePrefixedAssetB(const void *buf) {
|
|
||||||
return ::flatbuffers::GetSizePrefixedRoot<Bigfoot::Flat::AssetB>(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <bool B = false>
|
|
||||||
inline bool VerifyAssetBBuffer(
|
|
||||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
|
||||||
return verifier.template VerifyBuffer<Bigfoot::Flat::AssetB>(nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <bool B = false>
|
|
||||||
inline bool VerifySizePrefixedAssetBBuffer(
|
|
||||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
|
||||||
return verifier.template VerifySizePrefixedBuffer<Bigfoot::Flat::AssetB>(nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void FinishAssetBBuffer(
|
|
||||||
::flatbuffers::FlatBufferBuilder &fbb,
|
|
||||||
::flatbuffers::Offset<Bigfoot::Flat::AssetB> root) {
|
|
||||||
fbb.Finish(root);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void FinishSizePrefixedAssetBBuffer(
|
|
||||||
::flatbuffers::FlatBufferBuilder &fbb,
|
|
||||||
::flatbuffers::Offset<Bigfoot::Flat::AssetB> root) {
|
|
||||||
fbb.FinishSizePrefixed(root);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline eastl::unique_ptr<Bigfoot::Flat::AssetBT> UnPackAssetB(
|
|
||||||
const void *buf,
|
|
||||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
|
||||||
return eastl::unique_ptr<Bigfoot::Flat::AssetBT>(GetAssetB(buf)->UnPack(res));
|
|
||||||
}
|
|
||||||
|
|
||||||
inline eastl::unique_ptr<Bigfoot::Flat::AssetBT> UnPackSizePrefixedAssetB(
|
|
||||||
const void *buf,
|
|
||||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
|
||||||
return eastl::unique_ptr<Bigfoot::Flat::AssetBT>(GetSizePrefixedAssetB(buf)->UnPack(res));
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Flat
|
|
||||||
} // namespace Bigfoot
|
|
||||||
|
|
||||||
#endif // FLATBUFFERS_GENERATED_ASSETB_BIGFOOT_FLAT_H_
|
|
||||||
Reference in New Issue
Block a user