Compare commits
84 Commits
d97e342284
...
BigFile
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f02f47ee4 | |||
| 8685f3d1dd | |||
| 3fe5c31fc0 | |||
| 8996adec61 | |||
| 2003121d07 | |||
| 902ef87e1d | |||
| 9bea52973b | |||
| a343d65598 | |||
| bb279bb212 | |||
| 00b86fbd00 | |||
| 87d59a00c1 | |||
| 2c83dcc0bc | |||
| e3c55cc359 | |||
| d42f6d31d4 | |||
| 0e780c08d0 | |||
| 798ae04720 | |||
| 943597202b | |||
| acdbfb505e | |||
| 09ff240423 | |||
| 65727753c0 | |||
| 4bedaad0af | |||
| b87bd30db9 | |||
| 63c57b482a | |||
| f2228a0182 | |||
| b867701d2a | |||
| f314ffc2f7 | |||
| f77a11f27d | |||
| 9bfe308924 | |||
| 4798ed8ab7 | |||
| 0d3885a863 | |||
| 11f0106dea | |||
| dd7fe3bfba | |||
| 4261ddd393 | |||
| 4c9c4d5547 | |||
| b9b837137b | |||
| c925cba3a1 | |||
| 4af978fdeb | |||
| 2b5360e765 | |||
| 6e01879e21 | |||
| 60f312a97e | |||
| 1b3c914037 | |||
| b8b80b697c | |||
| 334390b8e8 | |||
| aa1a2ea4de | |||
| 53cfe7a413 | |||
| e5e4a997cb | |||
| f5ade086db | |||
| 6327cb7a76 | |||
| 8cb19d4693 | |||
| 64e2f5218f | |||
| 9936119fa5 | |||
| a21c539d0f | |||
| 5bf8d45521 | |||
| a075526eb0 | |||
| 34ea3f518f | |||
| abd5a9477f | |||
| df9fe0cb63 | |||
| a2136f5367 | |||
| 9b02711f59 | |||
| f7683a0fb7 | |||
| 85d136a91f | |||
| 2ffe0c4860 | |||
| 6c0584e276 | |||
| 1f6821c0e0 | |||
| f1b54d9e16 | |||
| fb259cae7c | |||
| a818f96f13 | |||
| a8b42835e0 | |||
| eb1b961b09 | |||
| 9c2c599de5 | |||
| f99a5e32a6 | |||
| 9ab704da29 | |||
| 0efb45616a | |||
| 2804391403 | |||
| 5709a2c7cd | |||
| 1ad36d1225 | |||
| 85eb1da205 | |||
| 674a84890c | |||
| f8a2d08070 | |||
| b44702d30b | |||
| 56d6f961bf | |||
| 284c5f9957 | |||
| a99a7e7d88 | |||
| e95a5022a7 |
@@ -51,7 +51,7 @@ CompactNamespaces: false
|
||||
Cpp11BracedListStyle: true
|
||||
EmptyLineBeforeAccessModifier: Always
|
||||
FixNamespaceComments: true
|
||||
IncludeBlocks: Preserve
|
||||
IncludeBlocks: Regroup
|
||||
IndentCaseBlocks: true
|
||||
IndentCaseLabels: false
|
||||
IndentPPDirectives: None
|
||||
@@ -119,4 +119,24 @@ SpaceAroundPointerQualifiers: Default
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceInEmptyBlock: true
|
||||
PenaltyBreakAssignment: 200
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
IncludeCategories:
|
||||
- Regex: '^<Engine/'
|
||||
Priority: 1
|
||||
- Regex: '^<System/'
|
||||
Priority: 2
|
||||
- Regex: '^<Utils/'
|
||||
Priority: 3
|
||||
- Regex: '^<EngineTests/'
|
||||
Priority: 4
|
||||
- Regex: '^<SystemTests/'
|
||||
Priority: 5
|
||||
- Regex: '^<UtilsTests/'
|
||||
Priority: 6
|
||||
- Regex: '^<[a-zA-Z0-9_/]+\.h>'
|
||||
Priority: 7
|
||||
- Regex: '^<[a-zA-Z0-9_/]+\.hpp>'
|
||||
Priority: 7
|
||||
- Regex: '^<[a-zA-Z0-9_/]+>'
|
||||
Priority: 8
|
||||
MainIncludeChar: AngleBracket
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"name": "Bigfoot",
|
||||
"image": "git.romainboullard.com/bigfootdev/linuxbigfootbuilder:main"
|
||||
"image": "git.romainboullard.com/bigfootdev/linuxcppbuilder:development"
|
||||
}
|
||||
|
||||
@@ -6,20 +6,18 @@ on:
|
||||
- '**'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CCACHE_BASEDIR: ${{ github.workspace }}
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
container:
|
||||
image: git.romainboullard.com/bigfootdev/linuxbigfootbuilder:main
|
||||
image: git.romainboullard.com/bigfootdev/linuxcppbuilder:development
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
build_type: ["Debug", "RelWithDebInfo", "Release"]
|
||||
unity_build: ["ON", "OFF"]
|
||||
conan_profile: ["./ConanProfiles/clang", "./ConanProfiles/clangd", "./ConanProfiles/clangd_asan"]
|
||||
conan_profile: ["./ConanProfiles/clang", "./ConanProfiles/clang_asan"]
|
||||
name: "Build & Test ${{ matrix.build_type }} with ${{ matrix.conan_profile }} (Unity Build: ${{ matrix.unity_build }})"
|
||||
steps:
|
||||
- name: Install Node.js
|
||||
@@ -30,22 +28,20 @@ jobs:
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Show ccache stats before
|
||||
run: ccache --zero-stats
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
conan install . --remote=bigfootpackages -pr:h=${{ matrix.conan_profile }} -pr:b=${{ matrix.conan_profile }} --build=missing -s build_type=${{ matrix.build_type }} -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True
|
||||
conan install . --remote=bigfootpackages -pr:h=${{ matrix.conan_profile }} -pr:b=./ConanProfiles/Tools/clang --build=* -s build_type=${{ matrix.build_type }} -o bigfoot/*:build_tests=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:tracy=False -o bigfoot/*:vulkan=True
|
||||
. ./build/${{ matrix.build_type }}/generators/conanbuild.sh
|
||||
cmake -S . -B ./build/${{ matrix.build_type }} --toolchain ./build/${{ matrix.build_type }}/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_UNITY_BUILD=${{ matrix.unity_build }} -G "Ninja"
|
||||
cmake --build build/${{ matrix.build_type }} --parallel $(nproc)
|
||||
|
||||
- name: Show ccache stats after
|
||||
run: ccache --show-stats
|
||||
. ./build/${{ matrix.build_type }}/generators/deactivate_conanbuild.sh
|
||||
|
||||
- name: Unit Tests
|
||||
run: |
|
||||
cd ./build/${{ matrix.build_type }}
|
||||
. ../../build/${{ matrix.build_type }}/generators/conanbuild.sh
|
||||
xvfb-run ctest . --output-on-failure
|
||||
. ../../build/${{ matrix.build_type }}/generators/deactivate_conanbuild.sh
|
||||
|
||||
clang-format:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -11,7 +11,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
container:
|
||||
image: git.romainboullard.com/bigfootdev/linuxbigfootbuilder:main
|
||||
image: git.romainboullard.com/bigfootdev/linuxcppbuilder:development
|
||||
|
||||
name: "Sonarqube"
|
||||
steps:
|
||||
- name: Install Node.js
|
||||
@@ -23,11 +24,13 @@ jobs:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Generate
|
||||
- name: Build
|
||||
run: |
|
||||
conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clang_coverage -pr:b=./ConanProfiles/clang_coverage --build=missing -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True
|
||||
conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clang_coverage -pr:b=./ConanProfiles/Tools/clang --build=* -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True
|
||||
. ./build/Debug/generators/conanbuild.sh
|
||||
cmake -S . -B ./build/Debug --toolchain ./build/Debug/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -G "Ninja"
|
||||
cmake --build build/Debug --parallel $(nproc)
|
||||
. ./build/Debug/generators/deactivate_conanbuild.sh
|
||||
|
||||
- name: Clang-Tidy
|
||||
run: run-clang-tidy -p ./build/Debug/ >> tidy_result.txt
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -18,4 +18,4 @@ graph_info.json
|
||||
|
||||
test_package/Vendor
|
||||
|
||||
graphviz
|
||||
graphviz*
|
||||
1
Bigfoot/Benchmarks/CMakeLists.txt
Normal file
1
Bigfoot/Benchmarks/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Utils)
|
||||
5
Bigfoot/Benchmarks/Utils/CMakeLists.txt
Normal file
5
Bigfoot/Benchmarks/Utils/CMakeLists.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
project(${PackageName}Benchmarks)
|
||||
|
||||
bigfoot_create_package_benchmarks(
|
||||
"")
|
||||
250
Bigfoot/Benchmarks/Utils/Container/SlotMap.cpp
Normal file
250
Bigfoot/Benchmarks/Utils/Container/SlotMap.cpp
Normal file
@@ -0,0 +1,250 @@
|
||||
#include <Utils/Containers/SlotMap.hpp>
|
||||
|
||||
#include <ankerl/unordered_dense.h>
|
||||
#include <benchmark/benchmark.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <random>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
struct MyComplexStruct
|
||||
{
|
||||
std::uint32_t m_actualValueForBench = 0; // field summed by the Iterate benchmark
|
||||
|
||||
float m_position[3] = {0.0f, 0.0f, 0.0f};
|
||||
float m_rotation[4] = {0.0f, 0.0f, 0.0f, 1.0f};
|
||||
float m_scale[3] = {1.0f, 1.0f, 1.0f};
|
||||
|
||||
std::uint64_t m_entityId = 0;
|
||||
std::uint32_t m_parentSlot = 0;
|
||||
std::uint32_t m_flags = 0;
|
||||
|
||||
MyComplexStruct() = default;
|
||||
|
||||
explicit MyComplexStruct(const std::uint32_t p_value):
|
||||
m_actualValueForBench(p_value),
|
||||
m_entityId(p_value)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
static_assert(sizeof(MyComplexStruct) == 64, "Payload should be exactly one cache line.");
|
||||
static_assert(std::is_trivially_copyable_v<MyComplexStruct>,
|
||||
"Container moves should be a plain memcpy, not a heap-touching move.");
|
||||
|
||||
class SlotMapAdaptor
|
||||
{
|
||||
public:
|
||||
using Key = SlotMap<MyComplexStruct>::SlotKey;
|
||||
|
||||
Key Add(MyComplexStruct&& p_value)
|
||||
{
|
||||
return m_container.Insert(std::move(p_value));
|
||||
}
|
||||
|
||||
const MyComplexStruct* Find(const Key p_key) const
|
||||
{
|
||||
return m_container.Get(p_key);
|
||||
}
|
||||
|
||||
void Remove(const Key p_key)
|
||||
{
|
||||
m_container.Remove(p_key);
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
m_container.Reset();
|
||||
}
|
||||
|
||||
template<class FUNC>
|
||||
void ForEachValue(FUNC&& p_func) const
|
||||
{
|
||||
for (const MyComplexStruct& value: m_container)
|
||||
{
|
||||
p_func(value);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
SlotMap<MyComplexStruct> m_container;
|
||||
};
|
||||
|
||||
template<class MAP>
|
||||
class HashMapHarnessAdaptor
|
||||
{
|
||||
public:
|
||||
using Key = typename MAP::key_type;
|
||||
|
||||
Key Add(MyComplexStruct&& p_value)
|
||||
{
|
||||
const Key key = m_nextKey++;
|
||||
m_container.emplace(key, std::move(p_value));
|
||||
return key;
|
||||
}
|
||||
|
||||
const MyComplexStruct* Find(const Key p_key) const
|
||||
{
|
||||
const auto it = m_container.find(p_key);
|
||||
return it != m_container.end() ? &it->second : nullptr;
|
||||
}
|
||||
|
||||
void Remove(const Key p_key)
|
||||
{
|
||||
m_container.erase(p_key);
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
m_container.clear();
|
||||
m_nextKey = 0;
|
||||
}
|
||||
|
||||
template<class FUNC>
|
||||
void ForEachValue(FUNC&& p_func) const
|
||||
{
|
||||
for (const auto& keyValue: m_container)
|
||||
{
|
||||
p_func(keyValue.second);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
MAP m_container;
|
||||
Key m_nextKey = 0;
|
||||
};
|
||||
|
||||
template<class ADAPTOR>
|
||||
void Insert(benchmark::State& state)
|
||||
{
|
||||
const auto count = static_cast<std::uint32_t>(state.range(0));
|
||||
|
||||
for (auto _: state)
|
||||
{
|
||||
ADAPTOR adaptor;
|
||||
for (std::uint32_t i = 0; i < count; ++i)
|
||||
{
|
||||
benchmark::DoNotOptimize(adaptor.Add(MyComplexStruct {i}));
|
||||
}
|
||||
benchmark::DoNotOptimize(adaptor);
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
|
||||
state.SetItemsProcessed(state.iterations() * count);
|
||||
}
|
||||
|
||||
template<class ADAPTOR>
|
||||
void Remove(benchmark::State& state)
|
||||
{
|
||||
const auto count = static_cast<std::uint32_t>(state.range(0));
|
||||
|
||||
ADAPTOR adaptor;
|
||||
std::vector<typename ADAPTOR::Key> keys;
|
||||
keys.reserve(count);
|
||||
std::mt19937 rng(0x5EEDU);
|
||||
|
||||
for (auto _: state)
|
||||
{
|
||||
state.PauseTiming();
|
||||
adaptor.Clear();
|
||||
keys.clear();
|
||||
for (std::uint32_t i = 0; i < count; ++i)
|
||||
{
|
||||
keys.push_back(adaptor.Add(MyComplexStruct {i}));
|
||||
}
|
||||
std::shuffle(keys.begin(), keys.end(), rng);
|
||||
state.ResumeTiming();
|
||||
|
||||
for (const typename ADAPTOR::Key key: keys)
|
||||
{
|
||||
adaptor.Remove(key);
|
||||
}
|
||||
benchmark::DoNotOptimize(adaptor);
|
||||
benchmark::ClobberMemory();
|
||||
}
|
||||
|
||||
state.SetItemsProcessed(state.iterations() * count);
|
||||
}
|
||||
|
||||
template<class ADAPTOR>
|
||||
void Get(benchmark::State& state)
|
||||
{
|
||||
const auto count = static_cast<std::uint32_t>(state.range(0));
|
||||
|
||||
ADAPTOR adaptor;
|
||||
std::vector<typename ADAPTOR::Key> keys;
|
||||
keys.reserve(count);
|
||||
for (std::uint32_t i = 0; i < count; ++i)
|
||||
{
|
||||
keys.push_back(adaptor.Add(MyComplexStruct {i}));
|
||||
}
|
||||
std::mt19937 rng(0x5EEDU);
|
||||
std::shuffle(keys.begin(), keys.end(), rng);
|
||||
|
||||
for (auto _: state)
|
||||
{
|
||||
std::uint64_t sum = 0;
|
||||
for (const typename ADAPTOR::Key key: keys)
|
||||
{
|
||||
if (const MyComplexStruct* const value = adaptor.Find(key))
|
||||
{
|
||||
sum += value->m_actualValueForBench;
|
||||
}
|
||||
}
|
||||
benchmark::DoNotOptimize(sum);
|
||||
}
|
||||
|
||||
state.SetItemsProcessed(state.iterations() * count);
|
||||
}
|
||||
|
||||
template<class ADAPTOR>
|
||||
void Iterate(benchmark::State& state)
|
||||
{
|
||||
const auto count = static_cast<std::uint32_t>(state.range(0));
|
||||
|
||||
ADAPTOR adaptor;
|
||||
for (std::uint32_t i = 0; i < count; ++i)
|
||||
{
|
||||
adaptor.Add(MyComplexStruct {i});
|
||||
}
|
||||
|
||||
for (auto _: state)
|
||||
{
|
||||
std::uint64_t sum = 0;
|
||||
adaptor.ForEachValue(
|
||||
[&sum](const MyComplexStruct& value)
|
||||
{
|
||||
sum += value.m_actualValueForBench;
|
||||
});
|
||||
benchmark::DoNotOptimize(sum);
|
||||
}
|
||||
|
||||
state.SetItemsProcessed(state.iterations() * count);
|
||||
}
|
||||
|
||||
#define BIGFOOT_REGISTER_BENCHMARKS(ADAPTOR, NAME) \
|
||||
BENCHMARK_TEMPLATE(Insert, ADAPTOR)->Name(NAME "/Insert")->Arg(512)->Arg(8192)->Arg(262'144)->Arg(4'194'304); \
|
||||
BENCHMARK_TEMPLATE(Remove, ADAPTOR)->Name(NAME "/Remove")->Arg(512)->Arg(8192)->Arg(262'144)->Arg(4'194'304); \
|
||||
BENCHMARK_TEMPLATE(Get, ADAPTOR)->Name(NAME "/Get")->Arg(512)->Arg(8192)->Arg(262'144)->Arg(4'194'304); \
|
||||
BENCHMARK_TEMPLATE(Iterate, ADAPTOR)->Name(NAME "/Iterate")->Arg(512)->Arg(8192)->Arg(262'144)->Arg(4'194'304);
|
||||
|
||||
using UnorderedDenseMapHarness = HashMapHarnessAdaptor<ankerl::unordered_dense::map<std::uint64_t, MyComplexStruct>>;
|
||||
using UnorderedDenseSegementedMapHarness =
|
||||
HashMapHarnessAdaptor<ankerl::unordered_dense::segmented_map<std::uint64_t, MyComplexStruct>>;
|
||||
using UnorderedMapHarness = HashMapHarnessAdaptor<std::unordered_map<std::uint64_t, MyComplexStruct>>;
|
||||
using MapHarness = HashMapHarnessAdaptor<std::map<std::uint64_t, MyComplexStruct>>;
|
||||
|
||||
BIGFOOT_REGISTER_BENCHMARKS(SlotMapAdaptor, "Bigfoot::SlotMap");
|
||||
BIGFOOT_REGISTER_BENCHMARKS(UnorderedDenseMapHarness, "ankerl::unordered_dense::map");
|
||||
BIGFOOT_REGISTER_BENCHMARKS(UnorderedDenseSegementedMapHarness, "ankerl::unordered_dense::segmented_map");
|
||||
BIGFOOT_REGISTER_BENCHMARKS(UnorderedMapHarness, "std::unordered_map");
|
||||
BIGFOOT_REGISTER_BENCHMARKS(MapHarness, "std::map");
|
||||
|
||||
#undef BIGFOOT_REGISTER_BENCHMARKS
|
||||
#undef BIGFOOT_CACHE_TIER_ARGS
|
||||
} // namespace Bigfoot
|
||||
@@ -2,20 +2,22 @@
|
||||
* \file AssetTypeID.cpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date February 2026
|
||||
* \date May 2026
|
||||
*********************************************************************/
|
||||
#include <Engine/BigFile/Asset/AssetTypeID.hpp>
|
||||
#include <Engine/Asset/AssetTypeID.hpp>
|
||||
|
||||
#include <Engine/Asset/AssetTypeID_generated.hpp>
|
||||
|
||||
namespace flatbuffers
|
||||
{
|
||||
Bigfoot::Flat::AssetTypeID Pack(const Bigfoot::AssetTypeID& p_assetTypeID)
|
||||
Flat::Bigfoot::AssetTypeID Pack(const Bigfoot::AssetTypeID& p_assetTypeID)
|
||||
{
|
||||
return Bigfoot::Flat::AssetTypeID {p_assetTypeID};
|
||||
return Flat::Bigfoot::AssetTypeID {p_assetTypeID};
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
Bigfoot::AssetTypeID UnPack(const Bigfoot::Flat::AssetTypeID& p_flatAssetTypeID)
|
||||
Bigfoot::AssetTypeID UnPack(const Flat::Bigfoot::AssetTypeID& p_flatAssetTypeID)
|
||||
{
|
||||
return Bigfoot::AssetTypeID {p_flatAssetTypeID.value()};
|
||||
}
|
||||
@@ -13,11 +13,11 @@ namespace Bigfoot
|
||||
BigFile::BigFile(const File& p_file)
|
||||
{
|
||||
[[maybe_unused]]
|
||||
const int result = sqlite3_open_v2(p_file.Absolute().Path().data(), &m_db, SQLITE_OPEN_READWRITE, nullptr);
|
||||
const int result = sqlite3_open_v2(p_file.ToAbsolute().GetPath().data(), &m_db, SQLITE_OPEN_READWRITE, nullptr);
|
||||
CRITICAL_ASSERT(EngineAssertHandler,
|
||||
result == SQLITE_OK,
|
||||
"Failed to open BigFile {} DB: {}",
|
||||
p_file.Absolute().Path(),
|
||||
p_file.ToAbsolute().GetPath(),
|
||||
sqlite3_errmsg(m_db));
|
||||
}
|
||||
|
||||
@@ -115,6 +115,19 @@ void BigFile::Request::Bind(const std::uint32_t p_index, const std::int64_t p_va
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
void BigFile::Request::Bind(const std::uint32_t p_index, const std::uint64_t p_value)
|
||||
{
|
||||
ASSERT(EngineAssertHandler,
|
||||
(p_index >= 1) && (p_index <= static_cast<std::uint32_t>(sqlite3_bind_parameter_count(m_statement))),
|
||||
"Invalid index for statement");
|
||||
|
||||
[[maybe_unused]]
|
||||
const int result = sqlite3_bind_int64(m_statement, p_index, std::bit_cast<std::int64_t>(p_value));
|
||||
ASSERT(EngineAssertHandler, result == SQLITE_OK, "Failed to bind value for statement: {}", sqlite3_errmsg(m_db));
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
void BigFile::Request::Bind(const std::uint32_t p_index, const float p_value)
|
||||
{
|
||||
ASSERT(EngineAssertHandler,
|
||||
@@ -230,6 +243,13 @@ BigFile::Request::Column::operator std::int64_t() const
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
BigFile::Request::Column::operator std::uint64_t() const
|
||||
{
|
||||
return std::bit_cast<std::uint64_t>(sqlite3_column_int64(m_statement, m_index));
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
BigFile::Request::Column::operator float() const
|
||||
{
|
||||
return static_cast<float>(sqlite3_column_double(m_statement, m_index));
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
PRAGMA journal_mode=WAL;
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
DROP TABLE IF EXISTS AssetHeader;
|
||||
CREATE TABLE IF NOT EXISTS AssetHeader (
|
||||
UUID BLOB NOT NULL UNIQUE,
|
||||
Name TEXT NOT NULL UNIQUE,
|
||||
@@ -22,7 +21,6 @@ BEGIN
|
||||
WHERE UUID = NEW.UUID;
|
||||
END;
|
||||
|
||||
DROP TABLE IF EXISTS Asset;
|
||||
CREATE TABLE IF NOT EXISTS Asset (
|
||||
UUID BLOB NOT NULL UNIQUE,
|
||||
|
||||
@@ -38,12 +36,4 @@ BEGIN
|
||||
UPDATE AssetHeader
|
||||
SET ModificationTime = CAST(unixepoch('subsec') AS INTEGER) * 1000000
|
||||
WHERE UUID = NEW.UUID;
|
||||
END;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS AssetDependency (
|
||||
AssetUUID BLOB NOT NULL,
|
||||
DependsOnUUID BLOB NOT NULL,
|
||||
PRIMARY KEY(AssetUUID, DependsOnUUID),
|
||||
FOREIGN KEY(AssetUUID) REFERENCES AssetHeader(UUID) ON DELETE CASCADE,
|
||||
FOREIGN KEY(DependsOnUUID) REFERENCES AssetHeader(UUID) ON DELETE RESTRICT
|
||||
);
|
||||
END;
|
||||
@@ -5,8 +5,7 @@ set(PublicDependencies
|
||||
SQLite::SQLite3)
|
||||
set(PrivateDependencies)
|
||||
set(BigfootPublicDependencies
|
||||
System
|
||||
Utils)
|
||||
System)
|
||||
set(BigfootPrivateDependencies)
|
||||
|
||||
set(BIGFOOT_MAJOR 0)
|
||||
|
||||
22
Bigfoot/Sources/Engine/Include/Engine/Asset/Asset.fbs
Normal file
22
Bigfoot/Sources/Engine/Include/Engine/Asset/Asset.fbs
Normal file
@@ -0,0 +1,22 @@
|
||||
include "Engine/Asset/AssetTypeID.fbs";
|
||||
|
||||
include "System/UUID/UUID.fbs";
|
||||
|
||||
namespace Flat.Bigfoot;
|
||||
|
||||
table AssetHeader
|
||||
{
|
||||
uuid: UUID (required, native_inline, id: 0);
|
||||
name: string (required, id: 1);
|
||||
type_id: AssetTypeID (required, native_inline, id: 2);
|
||||
type_name: string (required, id: 3);
|
||||
version: uint = 0 (id: 4);
|
||||
}
|
||||
|
||||
table Asset
|
||||
{
|
||||
header: AssetHeader (required, id: 0);
|
||||
inner_asset: [ubyte] (required, id: 1);
|
||||
}
|
||||
|
||||
root_type Asset;
|
||||
131
Bigfoot/Sources/Engine/Include/Engine/Asset/Asset.hpp
Normal file
131
Bigfoot/Sources/Engine/Include/Engine/Asset/Asset.hpp
Normal file
@@ -0,0 +1,131 @@
|
||||
/*********************************************************************
|
||||
* \file Asset.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date April 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINE_ASSET_ASSET_HPP
|
||||
#define BIGFOOT_ENGINE_ASSET_ASSET_HPP
|
||||
#include <Engine/Asset/Asset_generated.hpp>
|
||||
#include <Engine/Asset/Reference_generated.hpp>
|
||||
#include <Engine/EngineAssertHandler.hpp>
|
||||
|
||||
#include <EASTL/span.h>
|
||||
#include <EASTL/vector.h>
|
||||
#include <ankerl/unordered_dense.h>
|
||||
#include <flatbuffers/reflection.h>
|
||||
#include <rapidhash.h>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
template<class ASSET>
|
||||
class Asset
|
||||
{
|
||||
public:
|
||||
using FLAT_ASSET = typename ASSET::FLAT;
|
||||
|
||||
Asset():
|
||||
m_header(::Flat::Bigfoot::AssetHeaderT {.uuid = UUID {},
|
||||
.name = eastl::string {},
|
||||
.type_id = GetTypeID(),
|
||||
.type_name = eastl::string {GetTypeName()},
|
||||
.version = 0})
|
||||
{
|
||||
}
|
||||
|
||||
explicit Asset(const eastl::span<const std::byte> p_flatbuffer):
|
||||
Asset()
|
||||
{
|
||||
#ifdef BIGFOOT_NOT_OPTIMIZED
|
||||
flatbuffers::Verifier verifier {std::bit_cast<std::uint8_t*>(p_flatbuffer.data()), p_flatbuffer.size()};
|
||||
const bool assetVerified = ::Flat::Bigfoot::VerifyAssetBuffer(verifier);
|
||||
CRITICAL_ASSERT(EngineAssertHandler, assetVerified, "Given asset could not be verified!");
|
||||
|
||||
const ::Flat::Bigfoot::Asset* asset = flatbuffers::GetRoot<::Flat::Bigfoot::Asset>(p_flatbuffer.data());
|
||||
|
||||
flatbuffers::Verifier innerAssetVerifier {asset->inner_asset()->data(), asset->inner_asset()->size()};
|
||||
const bool innerAssetVerified = innerAssetVerifier.VerifyBuffer<FLAT_ASSET>();
|
||||
CRITICAL_ASSERT(EngineAssertHandler, innerAssetVerified, "Given asset could not be verified!");
|
||||
#else
|
||||
const ::Flat::Bigfoot::Asset* asset = flatbuffers::GetRoot<::Flat::Bigfoot::Asset>(p_flatbuffer.data());
|
||||
#endif
|
||||
|
||||
asset->header()->UnPackTo(&m_header);
|
||||
flatbuffers::GetRoot<FLAT_ASSET>(asset->inner_asset()->data())->UnPackTo(&m_asset, nullptr);
|
||||
}
|
||||
|
||||
Asset(const Asset& p_asset) = delete;
|
||||
Asset(Asset&& p_asset) = default;
|
||||
|
||||
~Asset() = default;
|
||||
|
||||
[[nodiscard]]
|
||||
const ::Flat::Bigfoot::AssetHeaderT& GetHeader() const
|
||||
{
|
||||
return m_header;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
const typename FLAT_ASSET::NativeTableType& GetAsset() const
|
||||
{
|
||||
return m_asset;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
typename FLAT_ASSET::NativeTableType& GetAsset()
|
||||
{
|
||||
return m_asset;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<std::byte> Save() const
|
||||
{
|
||||
flatbuffers::FlatBufferBuilder innerAssetFbb;
|
||||
innerAssetFbb.Finish(FLAT_ASSET::Pack(innerAssetFbb, &m_asset));
|
||||
|
||||
::Flat::Bigfoot::AssetT asset;
|
||||
asset.header = eastl::make_unique<::Flat::Bigfoot::AssetHeaderT>(m_header);
|
||||
asset.inner_asset = eastl::vector<std::uint8_t> {innerAssetFbb.GetBufferPointer(),
|
||||
innerAssetFbb.GetBufferPointer() + innerAssetFbb.GetSize()};
|
||||
|
||||
flatbuffers::FlatBufferBuilder assetFbb;
|
||||
assetFbb.Finish(::Flat::Bigfoot::Asset::Pack(assetFbb, &asset));
|
||||
|
||||
return eastl::vector<std::byte> {std::bit_cast<std::byte*>(assetFbb.GetBufferPointer()),
|
||||
std::bit_cast<std::byte*>(assetFbb.GetBufferPointer() + assetFbb.GetSize())};
|
||||
}
|
||||
|
||||
void SetName(const eastl::string_view p_name)
|
||||
{
|
||||
m_header.name = p_name;
|
||||
}
|
||||
|
||||
void SetVersion(const std::uint32_t p_version)
|
||||
{
|
||||
m_header.version = p_version;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
static std::uint64_t GetTypeID()
|
||||
{
|
||||
static const std::uint64_t typeID = rapidhash(FLAT_ASSET::GetFullyQualifiedName(),
|
||||
std::strlen(FLAT_ASSET::GetFullyQualifiedName()));
|
||||
return typeID;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
static eastl::string_view GetTypeName()
|
||||
{
|
||||
return FLAT_ASSET::GetFullyQualifiedName();
|
||||
}
|
||||
|
||||
Asset& operator=(const Asset& p_asset) = delete;
|
||||
Asset& operator=(Asset&& p_asset) = default;
|
||||
|
||||
private:
|
||||
::Flat::Bigfoot::AssetHeaderT m_header;
|
||||
typename FLAT_ASSET::NativeTableType m_asset;
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif
|
||||
103
Bigfoot/Sources/Engine/Include/Engine/Asset/AssetContainer.hpp
Normal file
103
Bigfoot/Sources/Engine/Include/Engine/Asset/AssetContainer.hpp
Normal file
@@ -0,0 +1,103 @@
|
||||
/*********************************************************************
|
||||
* \file AssetContainer.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date May 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINE_ASSET_ASSETCONTAINER_HPP
|
||||
#define BIGFOOT_ENGINE_ASSET_ASSETCONTAINER_HPP
|
||||
#include <Engine/Asset/Asset.hpp>
|
||||
#include <Engine/EngineAssertHandler.hpp>
|
||||
|
||||
#include <Utils/Containers/SlotMap.hpp>
|
||||
|
||||
#include <ankerl/unordered_dense.h>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
template<class ASSET>
|
||||
class AssetContainer
|
||||
{
|
||||
public:
|
||||
AssetContainer() = default;
|
||||
|
||||
AssetContainer(const AssetContainer& p_container) = default;
|
||||
AssetContainer(AssetContainer&& p_container) = default;
|
||||
|
||||
~AssetContainer() = default;
|
||||
|
||||
template<class... ARGS>
|
||||
[[nodiscard]]
|
||||
typename SlotMap<ASSET>::SlotKey Insert(ARGS&&... p_args)
|
||||
{
|
||||
const typename SlotMap<ASSET>::SlotKey slotKey = m_assets.Insert(std::forward<ARGS>(p_args)...);
|
||||
m_uuidToSlotKey.insert({m_assets.Get(slotKey)->GetHeader().uuid, slotKey});
|
||||
|
||||
return slotKey;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
ASSET* Get(const typename SlotMap<ASSET>::SlotKey p_key)
|
||||
{
|
||||
return m_assets.Get(p_key);
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
const ASSET* Get(const typename SlotMap<ASSET>::SlotKey p_key) const
|
||||
{
|
||||
return m_assets.Get(p_key);
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
typename SlotMap<ASSET>::SlotKey GetSlotKey(const UUID& p_uuid) const
|
||||
{
|
||||
if (const auto it = m_uuidToSlotKey.find(p_uuid); it != m_uuidToSlotKey.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
return typename SlotMap<ASSET>::SlotKey {};
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
bool Has(const typename SlotMap<ASSET>::SlotKey p_key) const
|
||||
{
|
||||
return m_assets.Has(p_key);
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
bool Has(const UUID& p_uuid) const
|
||||
{
|
||||
return m_uuidToSlotKey.contains(p_uuid);
|
||||
}
|
||||
|
||||
void Remove(const typename SlotMap<ASSET>::SlotKey p_key)
|
||||
{
|
||||
if (const ASSET* asset = Get(p_key))
|
||||
{
|
||||
const UUID uuid = asset->GetHeader().uuid;
|
||||
m_assets.Remove(p_key);
|
||||
m_uuidToSlotKey.erase(uuid);
|
||||
}
|
||||
}
|
||||
|
||||
void Remove(const UUID& p_uuid)
|
||||
{
|
||||
if (const auto it = m_uuidToSlotKey.find(p_uuid); it != m_uuidToSlotKey.end())
|
||||
{
|
||||
Remove(it->second);
|
||||
}
|
||||
}
|
||||
|
||||
AssetContainer& operator=(const AssetContainer& p_container) = default;
|
||||
AssetContainer& operator=(AssetContainer&& p_container) = default;
|
||||
|
||||
private:
|
||||
ankerl::unordered_dense::segmented_map<UUID, typename SlotMap<ASSET>::SlotKey> m_uuidToSlotKey;
|
||||
|
||||
SlotMap<ASSET> m_assets;
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif
|
||||
66
Bigfoot/Sources/Engine/Include/Engine/Asset/AssetHelper.hpp
Normal file
66
Bigfoot/Sources/Engine/Include/Engine/Asset/AssetHelper.hpp
Normal file
@@ -0,0 +1,66 @@
|
||||
/*********************************************************************
|
||||
* \file AssetHelper.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date April 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINE_ASSET_ASSETHELPER_HPP
|
||||
#define BIGFOOT_ENGINE_ASSET_ASSETHELPER_HPP
|
||||
#include <Engine/Asset/AssetContainer.hpp>
|
||||
#include <Engine/Asset/Reference.hpp>
|
||||
#include <Engine/Asset/Reference_generated.hpp>
|
||||
|
||||
#define ASSET_SOFT_REF_DECL(AssetName, AssetType) \
|
||||
namespace flatbuffers \
|
||||
{ \
|
||||
Flat::Bigfoot::SoftReference PackSoftReference##AssetName(const Bigfoot::SoftReference<AssetType>& p_softRef); \
|
||||
Bigfoot::SoftReference<AssetType> UnPackSoftReference##AssetName(const Flat::Bigfoot::SoftReference& p_softRef); \
|
||||
}
|
||||
|
||||
#define ASSET_HARD_REF_DECL(AssetName, AssetType) \
|
||||
namespace flatbuffers \
|
||||
{ \
|
||||
Flat::Bigfoot::HardReference PackHardReference##AssetName(const Bigfoot::HardReference<AssetType>& p_hardRef); \
|
||||
Bigfoot::HardReference<AssetType> UnPackHardReference##AssetName(const Flat::Bigfoot::HardReference& p_hardRef); \
|
||||
}
|
||||
|
||||
#define ASSET_REF_DECL(AssetName, AssetType) \
|
||||
ASSET_SOFT_REF_DECL(AssetName, AssetType) \
|
||||
ASSET_HARD_REF_DECL(AssetName, AssetType)
|
||||
|
||||
#define ASSET_DECL(AssetName, AssetType) ASSET_REF_DECL(AssetName, AssetType)
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
#define ASSET_SOFT_REF_IMPL(AssetName, AssetType) \
|
||||
namespace flatbuffers \
|
||||
{ \
|
||||
Flat::Bigfoot::SoftReference PackSoftReference##AssetName(const Bigfoot::SoftReference<AssetType>& p_softRef) \
|
||||
{ \
|
||||
return {flatbuffers::Pack(p_softRef.GetUUID())}; \
|
||||
} \
|
||||
Bigfoot::SoftReference<AssetType> UnPackSoftReference##AssetName(const Flat::Bigfoot::SoftReference& p_softRef) \
|
||||
{ \
|
||||
return {flatbuffers::UnPack(p_softRef.uuid())}; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define ASSET_HARD_REF_IMPL(AssetName, AssetType) \
|
||||
namespace flatbuffers \
|
||||
{ \
|
||||
Flat::Bigfoot::HardReference PackHardReference##AssetName(const Bigfoot::HardReference<AssetType>& p_hardRef) \
|
||||
{ \
|
||||
return {flatbuffers::Pack(p_hardRef.GetUUID())}; \
|
||||
} \
|
||||
Bigfoot::HardReference<AssetType> UnPackHardReference##AssetName(const Flat::Bigfoot::HardReference& p_hardRef) \
|
||||
{ \
|
||||
return {flatbuffers::UnPack(p_hardRef.uuid())}; \
|
||||
} \
|
||||
}
|
||||
|
||||
#define ASSET_REF_IMPL(AssetName, AssetType) \
|
||||
ASSET_SOFT_REF_IMPL(AssetName, AssetType) \
|
||||
ASSET_HARD_REF_IMPL(AssetName, AssetType)
|
||||
|
||||
#define ASSET_IMPL(AssetName, AssetType) ASSET_REF_IMPL(AssetName, AssetType)
|
||||
#endif
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Bigfoot.Flat;
|
||||
native_include "Engine/Asset/AssetTypeID.hpp";
|
||||
|
||||
namespace Flat.Bigfoot;
|
||||
|
||||
struct AssetTypeID (native_type: "::Bigfoot::AssetTypeID")
|
||||
{
|
||||
34
Bigfoot/Sources/Engine/Include/Engine/Asset/AssetTypeID.hpp
Normal file
34
Bigfoot/Sources/Engine/Include/Engine/Asset/AssetTypeID.hpp
Normal file
@@ -0,0 +1,34 @@
|
||||
/*********************************************************************
|
||||
* \file AssetTypeID.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date February 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINE_ASSET_ASSETTYPEID_HPP
|
||||
#define BIGFOOT_ENGINE_ASSET_ASSETTYPEID_HPP
|
||||
#include <cstdint>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
using AssetTypeID = std::uint64_t;
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
namespace Flat
|
||||
{
|
||||
namespace Bigfoot
|
||||
{
|
||||
struct AssetTypeID;
|
||||
}
|
||||
} // namespace Flat
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
namespace flatbuffers
|
||||
{
|
||||
Flat::Bigfoot::AssetTypeID Pack(const Bigfoot::AssetTypeID& p_assetTypeID);
|
||||
Bigfoot::AssetTypeID UnPack(const Flat::Bigfoot::AssetTypeID& p_flatAssetTypeID);
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif
|
||||
@@ -1,8 +1,8 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_ASSETTYPEID_BIGFOOT_FLAT_H_
|
||||
#define FLATBUFFERS_GENERATED_ASSETTYPEID_BIGFOOT_FLAT_H_
|
||||
#ifndef FLATBUFFERS_GENERATED_ASSETTYPEID_FLAT_BIGFOOT_H_
|
||||
#define FLATBUFFERS_GENERATED_ASSETTYPEID_FLAT_BIGFOOT_H_
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
@@ -13,11 +13,14 @@ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 19,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "Engine/Asset/AssetTypeID.hpp"
|
||||
|
||||
#include "EASTL/unique_ptr.h"
|
||||
#include "EASTL/string.h"
|
||||
#include "EASTL/vector.h"
|
||||
|
||||
namespace Bigfoot {
|
||||
namespace Flat {
|
||||
namespace Bigfoot {
|
||||
|
||||
struct AssetTypeID;
|
||||
|
||||
@@ -33,7 +36,7 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) AssetTypeID FLATBUFFERS_FINAL_CLASS {
|
||||
return AssetTypeIDTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.AssetTypeID";
|
||||
return "Flat.Bigfoot.AssetTypeID";
|
||||
}
|
||||
AssetTypeID()
|
||||
: value_(0) {
|
||||
@@ -56,16 +59,13 @@ inline const ::flatbuffers::TypeTable *AssetTypeIDTypeTable() {
|
||||
{ ::flatbuffers::ET_ULONG, 0, -1 }
|
||||
};
|
||||
static const int64_t values[] = { 0, 8 };
|
||||
static const char * const names[] = {
|
||||
"value"
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_STRUCT, 1, type_codes, nullptr, nullptr, values, names
|
||||
::flatbuffers::ST_STRUCT, 1, type_codes, nullptr, nullptr, values, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
} // namespace Flat
|
||||
} // namespace Bigfoot
|
||||
} // namespace Flat
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_ASSETTYPEID_BIGFOOT_FLAT_H_
|
||||
#endif // FLATBUFFERS_GENERATED_ASSETTYPEID_FLAT_BIGFOOT_H_
|
||||
406
Bigfoot/Sources/Engine/Include/Engine/Asset/Asset_generated.hpp
Normal file
406
Bigfoot/Sources/Engine/Include/Engine/Asset/Asset_generated.hpp
Normal file
@@ -0,0 +1,406 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_ASSET_FLAT_BIGFOOT_H_
|
||||
#define FLATBUFFERS_GENERATED_ASSET_FLAT_BIGFOOT_H_
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
// Ensure the included flatbuffers.h is the same version as when this file was
|
||||
// generated, otherwise it may not be compatible.
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 12 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 19,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "Engine/Asset/AssetTypeID.hpp"
|
||||
#include "System/UUID/UUID.hpp"
|
||||
#include "Engine/Asset/AssetTypeID_generated.hpp"
|
||||
#include "System/UUID/UUID_generated.hpp"
|
||||
|
||||
#include "EASTL/unique_ptr.h"
|
||||
#include "EASTL/string.h"
|
||||
#include "EASTL/vector.h"
|
||||
|
||||
namespace Flat {
|
||||
namespace Bigfoot {
|
||||
|
||||
struct AssetHeader;
|
||||
struct AssetHeaderBuilder;
|
||||
struct AssetHeaderT;
|
||||
|
||||
struct Asset;
|
||||
struct AssetBuilder;
|
||||
struct AssetT;
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetHeaderTypeTable();
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetTypeTable();
|
||||
|
||||
struct AssetHeaderT : public ::flatbuffers::NativeTable {
|
||||
typedef AssetHeader TableType;
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.AssetHeaderT";
|
||||
}
|
||||
::Bigfoot::UUID uuid{};
|
||||
eastl::string name{};
|
||||
::Bigfoot::AssetTypeID type_id{};
|
||||
eastl::string type_name{};
|
||||
uint32_t version = 0;
|
||||
};
|
||||
|
||||
struct AssetHeader FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef AssetHeaderT NativeTableType;
|
||||
typedef AssetHeaderBuilder Builder;
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AssetHeaderTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.AssetHeader";
|
||||
}
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_UUID = 4,
|
||||
VT_NAME = 6,
|
||||
VT_TYPE_ID = 8,
|
||||
VT_TYPE_NAME = 10,
|
||||
VT_VERSION = 12
|
||||
};
|
||||
const Flat::Bigfoot::UUID *uuid() const {
|
||||
return GetStruct<const Flat::Bigfoot::UUID *>(VT_UUID);
|
||||
}
|
||||
const ::flatbuffers::String *name() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_NAME);
|
||||
}
|
||||
const Flat::Bigfoot::AssetTypeID *type_id() const {
|
||||
return GetStruct<const Flat::Bigfoot::AssetTypeID *>(VT_TYPE_ID);
|
||||
}
|
||||
const ::flatbuffers::String *type_name() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_TYPE_NAME);
|
||||
}
|
||||
uint32_t version() const {
|
||||
return GetField<uint32_t>(VT_VERSION, 0);
|
||||
}
|
||||
template <bool B = false>
|
||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyFieldRequired<Flat::Bigfoot::UUID>(verifier, VT_UUID, 1) &&
|
||||
VerifyOffsetRequired(verifier, VT_NAME) &&
|
||||
verifier.VerifyString(name()) &&
|
||||
VerifyFieldRequired<Flat::Bigfoot::AssetTypeID>(verifier, VT_TYPE_ID, 8) &&
|
||||
VerifyOffsetRequired(verifier, VT_TYPE_NAME) &&
|
||||
verifier.VerifyString(type_name()) &&
|
||||
VerifyField<uint32_t>(verifier, VT_VERSION, 4) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
AssetHeaderT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
void UnPackTo(AssetHeaderT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
static ::flatbuffers::Offset<AssetHeader> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
};
|
||||
|
||||
struct AssetHeaderBuilder {
|
||||
typedef AssetHeader Table;
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_uuid(const Flat::Bigfoot::UUID *uuid) {
|
||||
fbb_.AddStruct(AssetHeader::VT_UUID, uuid);
|
||||
}
|
||||
void add_name(::flatbuffers::Offset<::flatbuffers::String> name) {
|
||||
fbb_.AddOffset(AssetHeader::VT_NAME, name);
|
||||
}
|
||||
void add_type_id(const Flat::Bigfoot::AssetTypeID *type_id) {
|
||||
fbb_.AddStruct(AssetHeader::VT_TYPE_ID, type_id);
|
||||
}
|
||||
void add_type_name(::flatbuffers::Offset<::flatbuffers::String> type_name) {
|
||||
fbb_.AddOffset(AssetHeader::VT_TYPE_NAME, type_name);
|
||||
}
|
||||
void add_version(uint32_t version) {
|
||||
fbb_.AddElement<uint32_t>(AssetHeader::VT_VERSION, version, 0);
|
||||
}
|
||||
explicit AssetHeaderBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
::flatbuffers::Offset<AssetHeader> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<AssetHeader>(end);
|
||||
fbb_.Required(o, AssetHeader::VT_UUID);
|
||||
fbb_.Required(o, AssetHeader::VT_NAME);
|
||||
fbb_.Required(o, AssetHeader::VT_TYPE_ID);
|
||||
fbb_.Required(o, AssetHeader::VT_TYPE_NAME);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<AssetHeader> CreateAssetHeader(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const Flat::Bigfoot::UUID *uuid = nullptr,
|
||||
::flatbuffers::Offset<::flatbuffers::String> name = 0,
|
||||
const Flat::Bigfoot::AssetTypeID *type_id = nullptr,
|
||||
::flatbuffers::Offset<::flatbuffers::String> type_name = 0,
|
||||
uint32_t version = 0) {
|
||||
AssetHeaderBuilder builder_(_fbb);
|
||||
builder_.add_version(version);
|
||||
builder_.add_type_name(type_name);
|
||||
builder_.add_type_id(type_id);
|
||||
builder_.add_name(name);
|
||||
builder_.add_uuid(uuid);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct AssetHeader::Traits {
|
||||
using type = AssetHeader;
|
||||
static auto constexpr Create = CreateAssetHeader;
|
||||
};
|
||||
|
||||
::flatbuffers::Offset<AssetHeader> CreateAssetHeader(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct AssetT : public ::flatbuffers::NativeTable {
|
||||
typedef Asset TableType;
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.AssetT";
|
||||
}
|
||||
eastl::unique_ptr<Flat::Bigfoot::AssetHeaderT> header{};
|
||||
eastl::vector<uint8_t> inner_asset{};
|
||||
AssetT() = default;
|
||||
AssetT(const AssetT &o);
|
||||
AssetT(AssetT&&) FLATBUFFERS_NOEXCEPT = default;
|
||||
AssetT &operator=(AssetT o) FLATBUFFERS_NOEXCEPT;
|
||||
};
|
||||
|
||||
struct Asset FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef AssetT NativeTableType;
|
||||
typedef AssetBuilder Builder;
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AssetTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.Asset";
|
||||
}
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_HEADER = 4,
|
||||
VT_INNER_ASSET = 6
|
||||
};
|
||||
const Flat::Bigfoot::AssetHeader *header() const {
|
||||
return GetPointer<const Flat::Bigfoot::AssetHeader *>(VT_HEADER);
|
||||
}
|
||||
const ::flatbuffers::Vector<uint8_t> *inner_asset() const {
|
||||
return GetPointer<const ::flatbuffers::Vector<uint8_t> *>(VT_INNER_ASSET);
|
||||
}
|
||||
template <bool B = false>
|
||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffsetRequired(verifier, VT_HEADER) &&
|
||||
verifier.VerifyTable(header()) &&
|
||||
VerifyOffsetRequired(verifier, VT_INNER_ASSET) &&
|
||||
verifier.VerifyVector(inner_asset()) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
AssetT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
void UnPackTo(AssetT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
static ::flatbuffers::Offset<Asset> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
};
|
||||
|
||||
struct AssetBuilder {
|
||||
typedef Asset Table;
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_header(::flatbuffers::Offset<Flat::Bigfoot::AssetHeader> header) {
|
||||
fbb_.AddOffset(Asset::VT_HEADER, header);
|
||||
}
|
||||
void add_inner_asset(::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> inner_asset) {
|
||||
fbb_.AddOffset(Asset::VT_INNER_ASSET, inner_asset);
|
||||
}
|
||||
explicit AssetBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
::flatbuffers::Offset<Asset> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<Asset>(end);
|
||||
fbb_.Required(o, Asset::VT_HEADER);
|
||||
fbb_.Required(o, Asset::VT_INNER_ASSET);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<Asset> CreateAsset(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<Flat::Bigfoot::AssetHeader> header = 0,
|
||||
::flatbuffers::Offset<::flatbuffers::Vector<uint8_t>> inner_asset = 0) {
|
||||
AssetBuilder builder_(_fbb);
|
||||
builder_.add_inner_asset(inner_asset);
|
||||
builder_.add_header(header);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct Asset::Traits {
|
||||
using type = Asset;
|
||||
static auto constexpr Create = CreateAsset;
|
||||
};
|
||||
|
||||
::flatbuffers::Offset<Asset> CreateAsset(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
inline AssetHeaderT *AssetHeader::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
auto _o = std::make_unique<AssetHeaderT>();
|
||||
UnPackTo(_o.get(), _resolver);
|
||||
return _o.release();
|
||||
}
|
||||
|
||||
inline void AssetHeader::UnPackTo(AssetHeaderT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
(void)_o;
|
||||
(void)_resolver;
|
||||
{ auto _e = uuid(); if (_e) _o->uuid = ::flatbuffers::UnPack(*_e); }
|
||||
{ auto _e = name(); if (_e) _o->name = eastl::string(_e->c_str(), _e->size()); }
|
||||
{ auto _e = type_id(); if (_e) _o->type_id = ::flatbuffers::UnPack(*_e); }
|
||||
{ auto _e = type_name(); if (_e) _o->type_name = eastl::string(_e->c_str(), _e->size()); }
|
||||
{ auto _e = version(); _o->version = _e; }
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetHeader> CreateAssetHeader(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
return AssetHeader::Pack(_fbb, _o, _rehasher);
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetHeader> AssetHeader::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
(void)_rehasher;
|
||||
(void)_o;
|
||||
struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetHeaderT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
|
||||
auto _uuid = ::flatbuffers::Pack(_o->uuid);
|
||||
auto _name = _fbb.CreateString(_o->name);
|
||||
auto _type_id = ::flatbuffers::Pack(_o->type_id);
|
||||
auto _type_name = _fbb.CreateString(_o->type_name);
|
||||
auto _version = _o->version;
|
||||
return Flat::Bigfoot::CreateAssetHeader(
|
||||
_fbb,
|
||||
&_uuid,
|
||||
_name,
|
||||
&_type_id,
|
||||
_type_name,
|
||||
_version);
|
||||
}
|
||||
|
||||
inline AssetT::AssetT(const AssetT &o)
|
||||
: header((o.header) ? new Flat::Bigfoot::AssetHeaderT(*o.header) : nullptr),
|
||||
inner_asset(o.inner_asset) {
|
||||
}
|
||||
|
||||
inline AssetT &AssetT::operator=(AssetT o) FLATBUFFERS_NOEXCEPT {
|
||||
std::swap(header, o.header);
|
||||
std::swap(inner_asset, o.inner_asset);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline AssetT *Asset::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
auto _o = std::make_unique<AssetT>();
|
||||
UnPackTo(_o.get(), _resolver);
|
||||
return _o.release();
|
||||
}
|
||||
|
||||
inline void Asset::UnPackTo(AssetT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
(void)_o;
|
||||
(void)_resolver;
|
||||
{ auto _e = header(); if (_e) { if(_o->header) { _e->UnPackTo(_o->header.get(), _resolver); } else { _o->header = eastl::unique_ptr<Flat::Bigfoot::AssetHeaderT>(_e->UnPack(_resolver)); } } else if (_o->header) { _o->header.reset(); } }
|
||||
{ auto _e = inner_asset(); if (_e) { _o->inner_asset.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->inner_asset.begin()); } }
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<Asset> CreateAsset(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
return Asset::Pack(_fbb, _o, _rehasher);
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<Asset> Asset::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
(void)_rehasher;
|
||||
(void)_o;
|
||||
struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
|
||||
auto _header = _o->header ? CreateAssetHeader(_fbb, _o->header.get(), _rehasher) : 0;
|
||||
auto _inner_asset = _fbb.CreateVector(_o->inner_asset.data(), _o->inner_asset.size());
|
||||
return Flat::Bigfoot::CreateAsset(
|
||||
_fbb,
|
||||
_header,
|
||||
_inner_asset);
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetHeaderTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
||||
{ ::flatbuffers::ET_STRING, 0, -1 },
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 1 },
|
||||
{ ::flatbuffers::ET_STRING, 0, -1 },
|
||||
{ ::flatbuffers::ET_UINT, 0, -1 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Flat::Bigfoot::UUIDTypeTable,
|
||||
Flat::Bigfoot::AssetTypeIDTypeTable
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
||||
{ ::flatbuffers::ET_UCHAR, 1, -1 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Flat::Bigfoot::AssetHeaderTypeTable
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const Flat::Bigfoot::Asset *GetAsset(const void *buf) {
|
||||
return ::flatbuffers::GetRoot<Flat::Bigfoot::Asset>(buf);
|
||||
}
|
||||
|
||||
inline const Flat::Bigfoot::Asset *GetSizePrefixedAsset(const void *buf) {
|
||||
return ::flatbuffers::GetSizePrefixedRoot<Flat::Bigfoot::Asset>(buf);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifyAssetBuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifyBuffer<Flat::Bigfoot::Asset>(nullptr);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifySizePrefixedAssetBuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifySizePrefixedBuffer<Flat::Bigfoot::Asset>(nullptr);
|
||||
}
|
||||
|
||||
inline const char *AssetExtension() {
|
||||
return "bfbs";
|
||||
}
|
||||
|
||||
inline void FinishAssetBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Flat::Bigfoot::Asset> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedAssetBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Flat::Bigfoot::Asset> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Flat::Bigfoot::AssetT> UnPackAsset(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Flat::Bigfoot::AssetT>(GetAsset(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Flat::Bigfoot::AssetT> UnPackSizePrefixedAsset(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Flat::Bigfoot::AssetT>(GetSizePrefixedAsset(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
} // namespace Bigfoot
|
||||
} // namespace Flat
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_ASSET_FLAT_BIGFOOT_H_
|
||||
15
Bigfoot/Sources/Engine/Include/Engine/Asset/Reference.fbs
Normal file
15
Bigfoot/Sources/Engine/Include/Engine/Asset/Reference.fbs
Normal file
@@ -0,0 +1,15 @@
|
||||
native_include "Engine/Asset/Reference.hpp";
|
||||
|
||||
include "System/UUID/UUID.fbs";
|
||||
|
||||
namespace Flat.Bigfoot;
|
||||
|
||||
struct HardReference
|
||||
{
|
||||
uuid:UUID;
|
||||
}
|
||||
|
||||
struct SoftReference
|
||||
{
|
||||
uuid:UUID;
|
||||
}
|
||||
179
Bigfoot/Sources/Engine/Include/Engine/Asset/Reference.hpp
Normal file
179
Bigfoot/Sources/Engine/Include/Engine/Asset/Reference.hpp
Normal file
@@ -0,0 +1,179 @@
|
||||
/*********************************************************************
|
||||
* \file Reference.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date April 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINE_ASSET_REFERENCE_HPP
|
||||
#define BIGFOOT_ENGINE_ASSET_REFERENCE_HPP
|
||||
#include <Engine/Asset/AssetContainer.hpp>
|
||||
|
||||
#include <System/UUID/UUID.hpp>
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
template<class ASSET>
|
||||
class HardReference
|
||||
{
|
||||
public:
|
||||
HardReference() = default;
|
||||
|
||||
HardReference(const UUID& p_uuid):
|
||||
m_uuid(p_uuid)
|
||||
{
|
||||
Acquire();
|
||||
}
|
||||
|
||||
HardReference(const HardReference& p_ref):
|
||||
m_uuid(p_ref.m_uuid)
|
||||
{
|
||||
Acquire();
|
||||
}
|
||||
|
||||
HardReference(HardReference&& p_ref) noexcept:
|
||||
m_uuid(std::exchange(p_ref.m_uuid, UUID::NULL_UUID))
|
||||
{
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
const UUID& GetUUID() const
|
||||
{
|
||||
return m_uuid;
|
||||
}
|
||||
|
||||
~HardReference()
|
||||
{
|
||||
Release();
|
||||
}
|
||||
|
||||
HardReference& operator=(const HardReference& p_ref)
|
||||
{
|
||||
if (this != &p_ref)
|
||||
{
|
||||
Release();
|
||||
m_uuid = p_ref.m_uuid;
|
||||
Acquire();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
HardReference& operator=(HardReference&& p_ref) noexcept
|
||||
{
|
||||
if (this != &p_ref)
|
||||
{
|
||||
Release();
|
||||
m_uuid = std::exchange(p_ref.m_uuid, UUID::NULL_UUID);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
bool operator==(const HardReference& p_ref) const
|
||||
{
|
||||
return m_uuid == p_ref.m_uuid;
|
||||
}
|
||||
|
||||
private:
|
||||
void Acquire()
|
||||
{
|
||||
if (m_uuid)
|
||||
{
|
||||
// AssetContainer<ASSET>::Get().IncrementHardRefCount(m_uuid);
|
||||
}
|
||||
}
|
||||
|
||||
void Release()
|
||||
{
|
||||
if (m_uuid)
|
||||
{
|
||||
// AssetContainer<ASSET>::Get().DecrementHardRefCount(m_uuid);
|
||||
}
|
||||
}
|
||||
|
||||
UUID m_uuid = UUID::NULL_UUID;
|
||||
};
|
||||
|
||||
template<class ASSET>
|
||||
class SoftReference
|
||||
{
|
||||
public:
|
||||
SoftReference() = default;
|
||||
|
||||
SoftReference(const UUID& p_uuid):
|
||||
m_uuid(p_uuid)
|
||||
{
|
||||
Acquire();
|
||||
}
|
||||
|
||||
SoftReference(const SoftReference& p_ref):
|
||||
m_uuid(p_ref.m_uuid)
|
||||
{
|
||||
Acquire();
|
||||
}
|
||||
|
||||
SoftReference(SoftReference&& p_ref) noexcept:
|
||||
m_uuid(std::exchange(p_ref.m_uuid, UUID::NULL_UUID))
|
||||
{
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
const UUID& GetUUID() const
|
||||
{
|
||||
return m_uuid;
|
||||
}
|
||||
|
||||
~SoftReference()
|
||||
{
|
||||
Release();
|
||||
}
|
||||
|
||||
SoftReference& operator=(const SoftReference& p_ref)
|
||||
{
|
||||
if (this != &p_ref)
|
||||
{
|
||||
Release();
|
||||
m_uuid = p_ref.m_uuid;
|
||||
Acquire();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
SoftReference& operator=(SoftReference&& p_ref) noexcept
|
||||
{
|
||||
if (this != &p_ref)
|
||||
{
|
||||
Release();
|
||||
m_uuid = std::exchange(p_ref.m_uuid, UUID::NULL_UUID);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
bool operator==(const SoftReference& p_ref) const
|
||||
{
|
||||
return m_uuid == p_ref.m_uuid;
|
||||
}
|
||||
|
||||
private:
|
||||
void Acquire()
|
||||
{
|
||||
if (m_uuid)
|
||||
{
|
||||
// AssetContainer<ASSET>::Get().IncrementSoftRefCount(m_uuid);
|
||||
}
|
||||
}
|
||||
|
||||
void Release()
|
||||
{
|
||||
if (m_uuid)
|
||||
{
|
||||
// AssetContainer<ASSET>::Get().DecrementSoftRefCount(m_uuid);
|
||||
}
|
||||
}
|
||||
|
||||
UUID m_uuid = UUID::NULL_UUID;
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
#endif
|
||||
@@ -0,0 +1,123 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_REFERENCE_FLAT_BIGFOOT_H_
|
||||
#define FLATBUFFERS_GENERATED_REFERENCE_FLAT_BIGFOOT_H_
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
// Ensure the included flatbuffers.h is the same version as when this file was
|
||||
// generated, otherwise it may not be compatible.
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 12 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 19,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "Engine/Asset/Reference.hpp"
|
||||
#include "System/UUID/UUID.hpp"
|
||||
#include "Engine/Asset/Reference.hpp"
|
||||
#include "System/UUID/UUID_generated.hpp"
|
||||
|
||||
#include "EASTL/unique_ptr.h"
|
||||
#include "EASTL/string.h"
|
||||
#include "EASTL/vector.h"
|
||||
|
||||
namespace Flat {
|
||||
namespace Bigfoot {
|
||||
|
||||
struct HardReference;
|
||||
|
||||
struct SoftReference;
|
||||
|
||||
inline const ::flatbuffers::TypeTable *HardReferenceTypeTable();
|
||||
|
||||
inline const ::flatbuffers::TypeTable *SoftReferenceTypeTable();
|
||||
|
||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) HardReference FLATBUFFERS_FINAL_CLASS {
|
||||
private:
|
||||
Flat::Bigfoot::UUID uuid_;
|
||||
|
||||
public:
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return HardReferenceTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.HardReference";
|
||||
}
|
||||
HardReference()
|
||||
: uuid_() {
|
||||
}
|
||||
HardReference(const Flat::Bigfoot::UUID &_uuid)
|
||||
: uuid_(_uuid) {
|
||||
}
|
||||
const Flat::Bigfoot::UUID &uuid() const {
|
||||
return uuid_;
|
||||
}
|
||||
};
|
||||
FLATBUFFERS_STRUCT_END(HardReference, 16);
|
||||
|
||||
struct HardReference::Traits {
|
||||
using type = HardReference;
|
||||
};
|
||||
|
||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) SoftReference FLATBUFFERS_FINAL_CLASS {
|
||||
private:
|
||||
Flat::Bigfoot::UUID uuid_;
|
||||
|
||||
public:
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return SoftReferenceTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.SoftReference";
|
||||
}
|
||||
SoftReference()
|
||||
: uuid_() {
|
||||
}
|
||||
SoftReference(const Flat::Bigfoot::UUID &_uuid)
|
||||
: uuid_(_uuid) {
|
||||
}
|
||||
const Flat::Bigfoot::UUID &uuid() const {
|
||||
return uuid_;
|
||||
}
|
||||
};
|
||||
FLATBUFFERS_STRUCT_END(SoftReference, 16);
|
||||
|
||||
struct SoftReference::Traits {
|
||||
using type = SoftReference;
|
||||
};
|
||||
|
||||
inline const ::flatbuffers::TypeTable *HardReferenceTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Flat::Bigfoot::UUIDTypeTable
|
||||
};
|
||||
static const int64_t values[] = { 0, 16 };
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_STRUCT, 1, type_codes, type_refs, nullptr, values, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *SoftReferenceTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Flat::Bigfoot::UUIDTypeTable
|
||||
};
|
||||
static const int64_t values[] = { 0, 16 };
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_STRUCT, 1, type_codes, type_refs, nullptr, values, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
} // namespace Bigfoot
|
||||
} // namespace Flat
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_REFERENCE_FLAT_BIGFOOT_H_
|
||||
@@ -1,122 +0,0 @@
|
||||
/*********************************************************************
|
||||
* \file Asset.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date February 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINE_ASSET_HPP
|
||||
#define BIGFOOT_ENGINE_ASSET_HPP
|
||||
#include <Engine/BigFile/Asset/AssetHeader_generated.hpp>
|
||||
|
||||
#include <Engine/EngineAssertHandler.hpp>
|
||||
|
||||
#include <EASTL/vector.h>
|
||||
#include <rapidhash.h>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
template<typename FLAT_ASSET>
|
||||
concept FlatAssetConcept = requires(FLAT_ASSET p_flatAsset) {
|
||||
requires std::is_base_of_v<::flatbuffers::Table, FLAT_ASSET> &&
|
||||
std::derived_from<typename FLAT_ASSET::NativeTableType, ::flatbuffers::NativeTable>;
|
||||
|
||||
{ FLAT_ASSET::GetFullyQualifiedName() } -> std::convertible_to<const char*>;
|
||||
{ p_flatAsset.asset_header() } -> std::same_as<const Bigfoot::Flat::AssetHeader*>;
|
||||
};
|
||||
|
||||
template<FlatAssetConcept FLAT_ASSET>
|
||||
class FlatAssetWrapper
|
||||
{
|
||||
private:
|
||||
using FLAT_ASSET_NATIVE = FLAT_ASSET::NativeTableType;
|
||||
using FLAT_ASSET_BUILDER = FLAT_ASSET::Builder;
|
||||
|
||||
public:
|
||||
FlatAssetWrapper()
|
||||
{
|
||||
m_asset.asset_header = eastl::make_unique<Flat::AssetHeaderT>();
|
||||
m_asset.asset_header->type_id = TypeID();
|
||||
m_asset.asset_header->type_name = TypeName();
|
||||
}
|
||||
|
||||
FlatAssetWrapper(const eastl::span<const std::byte> p_flatBuffer)
|
||||
{
|
||||
flatbuffers::Verifier::Options verifierOptions;
|
||||
flatbuffers::Verifier verifier {std::bit_cast<const std::uint8_t*>(p_flatBuffer.data()),
|
||||
p_flatBuffer.size(),
|
||||
verifierOptions};
|
||||
CRITICAL_ASSERT(EngineAssertHandler,
|
||||
verifier.VerifyBuffer<FLAT_ASSET>(),
|
||||
"Flatbuffer verifier failed for FLAT_ASSET!");
|
||||
|
||||
const FLAT_ASSET* flatAsset = flatbuffers::GetRoot<FLAT_ASSET>(p_flatBuffer.data());
|
||||
CRITICAL_ASSERT(EngineAssertHandler,
|
||||
flatAsset->asset_header()->type_id()->value() == TypeID() &&
|
||||
(std::strcmp(flatAsset->asset_header()->type_name()->c_str(), TypeName().data()) == 0),
|
||||
"Mismatch between flatbufer type and actual type! flatbuffer = {}/{}; expected = {}/{}",
|
||||
flatAsset->asset_header()->type_name()->c_str(),
|
||||
flatAsset->asset_header()->type_id()->value(),
|
||||
TypeName(),
|
||||
TypeID());
|
||||
|
||||
flatAsset->UnPackTo(&m_asset);
|
||||
}
|
||||
|
||||
FlatAssetWrapper(const FlatAssetWrapper& p_assetWrapper) = delete;
|
||||
FlatAssetWrapper(FlatAssetWrapper&& p_assetWrapper) = delete;
|
||||
|
||||
~FlatAssetWrapper() = default;
|
||||
|
||||
eastl::vector<std::byte> Pack() const
|
||||
{
|
||||
flatbuffers::FlatBufferBuilder builder;
|
||||
builder.Finish(FLAT_ASSET::Pack(builder, &m_asset));
|
||||
|
||||
eastl::vector<std::byte> result {builder.GetSize()};
|
||||
eastl::transform(builder.GetBufferSpan().begin(),
|
||||
builder.GetBufferSpan().end(),
|
||||
result.begin(),
|
||||
[](const std::uint8_t p_value)
|
||||
{
|
||||
return static_cast<std::byte>(p_value);
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
FLAT_ASSET_NATIVE& Asset()
|
||||
{
|
||||
return m_asset;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
const FLAT_ASSET_NATIVE& Asset() const
|
||||
{
|
||||
return m_asset;
|
||||
}
|
||||
|
||||
static AssetTypeID TypeID()
|
||||
{
|
||||
static eastl::string_view typeName = TypeName();
|
||||
static AssetTypeID typeID = rapidhash(typeName.data(), typeName.size());
|
||||
|
||||
return typeID;
|
||||
}
|
||||
|
||||
static eastl::string_view TypeName()
|
||||
{
|
||||
static eastl::string_view typeName {FLAT_ASSET::GetFullyQualifiedName()};
|
||||
|
||||
return typeName;
|
||||
}
|
||||
|
||||
FlatAssetWrapper& operator=(const FlatAssetWrapper p_assetWrapper) = delete;
|
||||
FlatAssetWrapper& operator=(FlatAssetWrapper&& p_assetWrapper) = delete;
|
||||
|
||||
private:
|
||||
FLAT_ASSET_NATIVE m_asset;
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif
|
||||
@@ -1,105 +0,0 @@
|
||||
/*********************************************************************
|
||||
* \file AssetContainer.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date February 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINE_ASSETCONTAINER_HPP
|
||||
#define BIGFOOT_ENGINE_ASSETCONTAINER_HPP
|
||||
#include <Engine/BigFile/Asset/Asset.hpp>
|
||||
#include <Engine/EngineAssertHandler.hpp>
|
||||
|
||||
#include <ankerl/unordered_dense.h>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
template<typename ASSET>
|
||||
concept BigfootAssetConcept = requires(ASSET p_asset, const ASSET p_constAsset) {
|
||||
requires FlatAssetConcept<typename ASSET::FLAT_ASSET> &&
|
||||
std::constructible_from<ASSET, FlatAssetWrapper<typename ASSET::FLAT_ASSET>*>;
|
||||
};
|
||||
|
||||
template<BigfootAssetConcept ASSET>
|
||||
class AssetContainer
|
||||
{
|
||||
public:
|
||||
AssetContainer() = default;
|
||||
|
||||
AssetContainer(const AssetContainer& p_container) = delete;
|
||||
AssetContainer(AssetContainer&& p_container) = delete;
|
||||
|
||||
[[nodiscard]]
|
||||
bool Add(const UUID& p_uuid)
|
||||
{
|
||||
return m_assets.emplace(p_uuid, AssetHandle {}).second;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
bool Load(const UUID& p_uuid, const eastl::span<const std::byte> p_flatBuffer)
|
||||
{
|
||||
if (!m_assets.contains(p_uuid))
|
||||
{
|
||||
const bool added = Add(p_uuid);
|
||||
ASSERT(EngineAssertHandler, added, "{} not added to AssetContainer! Already in container ?", p_uuid);
|
||||
}
|
||||
|
||||
AssetHandle& assetHandle = m_assets.at(p_uuid);
|
||||
if (assetHandle.m_assetPair)
|
||||
{
|
||||
SOFT_ASSERT(EngineAssertHandler, false, "{} already loaded!", p_uuid);
|
||||
return true;
|
||||
}
|
||||
|
||||
assetHandle.m_assetPair = eastl::make_unique<AssetHandle::Data>(p_flatBuffer);
|
||||
CRITICAL_ASSERT(EngineAssertHandler,
|
||||
assetHandle.m_assetPair->m_flatAsset.Asset().asset_header->uuid == p_uuid,
|
||||
"Mismatch between expected UUID and deserialized UUID ! Got {}; Expected {}",
|
||||
assetHandle.m_assetPair->m_flatAsset.Asset().asset_header->uuid,
|
||||
p_uuid);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void UnloadUnreferenced()
|
||||
{
|
||||
for (auto& keyValue: m_assets)
|
||||
{
|
||||
if (keyValue.second.m_hardRefCount == 0 && keyValue.second.m_assetPair)
|
||||
{
|
||||
keyValue.second.m_assetPair.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
~AssetContainer() = default;
|
||||
|
||||
AssetContainer& operator=(const AssetContainer& p_container) = delete;
|
||||
AssetContainer& operator=(AssetContainer&& p_container) = delete;
|
||||
|
||||
private:
|
||||
struct AssetHandle
|
||||
{
|
||||
struct Data
|
||||
{
|
||||
Data(const eastl::span<const std::byte> p_flatBuffer):
|
||||
m_flatAsset(p_flatBuffer),
|
||||
m_asset(&m_flatAsset)
|
||||
{
|
||||
}
|
||||
|
||||
FlatAssetWrapper<typename ASSET::FLAT_ASSET> m_flatAsset;
|
||||
ASSET m_asset;
|
||||
};
|
||||
|
||||
eastl::unique_ptr<Data> m_assetPair = nullptr;
|
||||
|
||||
std::uint32_t m_hardRefCount = 0;
|
||||
std::uint32_t m_softRefCount = 0;
|
||||
};
|
||||
|
||||
// We use a segmented_map here to keep stable references
|
||||
ankerl::unordered_dense::segmented_map<UUID, AssetHandle> m_assets;
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif
|
||||
Binary file not shown.
@@ -1,79 +0,0 @@
|
||||
/**
|
||||
* Auto-generated header from: AssetHeader.bfbs
|
||||
* Generated by Bin2CPP
|
||||
*
|
||||
* DO NOT TOUCH
|
||||
*/
|
||||
#ifndef ASSETHEADER_BFBS_HPP
|
||||
#define ASSETHEADER_BFBS_HPP
|
||||
#include <EASTL/array.h>
|
||||
#include <cstddef>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
inline constexpr eastl::array<std::byte, 960> g_AssetHeader_bfbs = {
|
||||
std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00},
|
||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x3C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x34}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x98}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x34}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x68}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xBC}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0xF8}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFC}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x10}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xAC}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x20}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x3C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x90}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0xCC}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x11}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, 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{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xDC}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x94}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x60}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, 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{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x60}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x76}, std::byte{0x65}, std::byte{0x72}, std::byte{0x73},
|
||||
std::byte{0x69}, std::byte{0x6F}, std::byte{0x6E}, std::byte{0x00}, std::byte{0xA0}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x03}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x8C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0D},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x09}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x5F}, std::byte{0x6E}, std::byte{0x61}, std::byte{0x6D},
|
||||
std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xD0}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x02}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00},
|
||||
std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x70}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0F},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65},
|
||||
std::byte{0x5F}, std::byte{0x69}, std::byte{0x64}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00},
|
||||
std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0D}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x6E}, std::byte{0x61}, std::byte{0x6D}, std::byte{0x65},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x04}, std::byte{0x00},
|
||||
std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0F},
|
||||
std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x75}, std::byte{0x75}, std::byte{0x69}, std::byte{0x64},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x54}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x58}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x4C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x34}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E},
|
||||
std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x53}, std::byte{0x79}, std::byte{0x73}, std::byte{0x74}, std::byte{0x65}, std::byte{0x6D}, std::byte{0x2F}, std::byte{0x49}, std::byte{0x6E}, std::byte{0x63}, std::byte{0x6C},
|
||||
std::byte{0x75}, std::byte{0x64}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x53}, std::byte{0x79}, std::byte{0x73}, std::byte{0x74}, std::byte{0x65}, std::byte{0x6D}, std::byte{0x2F}, std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x2F},
|
||||
std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x11}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x5C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x11}, std::byte{0x04}, std::byte{0x10}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x62}, std::byte{0x79}, std::byte{0x74}, std::byte{0x65}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x34}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x11}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x54}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x49},
|
||||
std::byte{0x44}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x54}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x49}, std::byte{0x44}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x76}, std::byte{0x61}, std::byte{0x6C}, std::byte{0x75}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}
|
||||
};
|
||||
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif // ASSETHEADER_BFBS_HPP
|
||||
@@ -1,18 +0,0 @@
|
||||
include "Engine/BigFile/Asset/AssetTypeID.fbs";
|
||||
native_include "Engine/BigFile/Asset/AssetTypeID.hpp";
|
||||
|
||||
include "System/UUID/UUID.fbs";
|
||||
native_include "System/UUID/UUID.hpp";
|
||||
|
||||
namespace Bigfoot.Flat;
|
||||
|
||||
table AssetHeader
|
||||
{
|
||||
uuid: UUID (required, native_inline);
|
||||
name: string (required);
|
||||
type_id: AssetTypeID (required, native_inline);
|
||||
type_name: string (required);
|
||||
version: uint;
|
||||
}
|
||||
|
||||
root_type AssetHeader;
|
||||
@@ -1,266 +0,0 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_ASSETHEADER_BIGFOOT_FLAT_H_
|
||||
#define FLATBUFFERS_GENERATED_ASSETHEADER_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 "Engine/BigFile/Asset/AssetTypeID_generated.hpp"
|
||||
#include "System/UUID/UUID_generated.hpp"
|
||||
|
||||
#include "EASTL/unique_ptr.h"
|
||||
#include "EASTL/string.h"
|
||||
|
||||
namespace Bigfoot {
|
||||
namespace Flat {
|
||||
|
||||
struct AssetHeader;
|
||||
struct AssetHeaderBuilder;
|
||||
struct AssetHeaderT;
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetHeaderTypeTable();
|
||||
|
||||
struct AssetHeaderT : public ::flatbuffers::NativeTable {
|
||||
typedef AssetHeader TableType;
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.AssetHeaderT";
|
||||
}
|
||||
::Bigfoot::UUID uuid{};
|
||||
eastl::string name{};
|
||||
::Bigfoot::AssetTypeID type_id{};
|
||||
eastl::string type_name{};
|
||||
uint32_t version = 0;
|
||||
};
|
||||
|
||||
struct AssetHeader FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef AssetHeaderT NativeTableType;
|
||||
typedef AssetHeaderBuilder Builder;
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AssetHeaderTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.AssetHeader";
|
||||
}
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_UUID = 4,
|
||||
VT_NAME = 6,
|
||||
VT_TYPE_ID = 8,
|
||||
VT_TYPE_NAME = 10,
|
||||
VT_VERSION = 12
|
||||
};
|
||||
const Bigfoot::Flat::UUID *uuid() const {
|
||||
return GetStruct<const Bigfoot::Flat::UUID *>(VT_UUID);
|
||||
}
|
||||
const ::flatbuffers::String *name() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_NAME);
|
||||
}
|
||||
const Bigfoot::Flat::AssetTypeID *type_id() const {
|
||||
return GetStruct<const Bigfoot::Flat::AssetTypeID *>(VT_TYPE_ID);
|
||||
}
|
||||
const ::flatbuffers::String *type_name() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_TYPE_NAME);
|
||||
}
|
||||
uint32_t version() const {
|
||||
return GetField<uint32_t>(VT_VERSION, 0);
|
||||
}
|
||||
template <bool B = false>
|
||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyFieldRequired<Bigfoot::Flat::UUID>(verifier, VT_UUID, 1) &&
|
||||
VerifyOffsetRequired(verifier, VT_NAME) &&
|
||||
verifier.VerifyString(name()) &&
|
||||
VerifyFieldRequired<Bigfoot::Flat::AssetTypeID>(verifier, VT_TYPE_ID, 8) &&
|
||||
VerifyOffsetRequired(verifier, VT_TYPE_NAME) &&
|
||||
verifier.VerifyString(type_name()) &&
|
||||
VerifyField<uint32_t>(verifier, VT_VERSION, 4) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
AssetHeaderT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
void UnPackTo(AssetHeaderT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
static ::flatbuffers::Offset<AssetHeader> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
};
|
||||
|
||||
struct AssetHeaderBuilder {
|
||||
typedef AssetHeader Table;
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_uuid(const Bigfoot::Flat::UUID *uuid) {
|
||||
fbb_.AddStruct(AssetHeader::VT_UUID, uuid);
|
||||
}
|
||||
void add_name(::flatbuffers::Offset<::flatbuffers::String> name) {
|
||||
fbb_.AddOffset(AssetHeader::VT_NAME, name);
|
||||
}
|
||||
void add_type_id(const Bigfoot::Flat::AssetTypeID *type_id) {
|
||||
fbb_.AddStruct(AssetHeader::VT_TYPE_ID, type_id);
|
||||
}
|
||||
void add_type_name(::flatbuffers::Offset<::flatbuffers::String> type_name) {
|
||||
fbb_.AddOffset(AssetHeader::VT_TYPE_NAME, type_name);
|
||||
}
|
||||
void add_version(uint32_t version) {
|
||||
fbb_.AddElement<uint32_t>(AssetHeader::VT_VERSION, version, 0);
|
||||
}
|
||||
explicit AssetHeaderBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
::flatbuffers::Offset<AssetHeader> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<AssetHeader>(end);
|
||||
fbb_.Required(o, AssetHeader::VT_UUID);
|
||||
fbb_.Required(o, AssetHeader::VT_NAME);
|
||||
fbb_.Required(o, AssetHeader::VT_TYPE_ID);
|
||||
fbb_.Required(o, AssetHeader::VT_TYPE_NAME);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<AssetHeader> CreateAssetHeader(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const Bigfoot::Flat::UUID *uuid = nullptr,
|
||||
::flatbuffers::Offset<::flatbuffers::String> name = 0,
|
||||
const Bigfoot::Flat::AssetTypeID *type_id = nullptr,
|
||||
::flatbuffers::Offset<::flatbuffers::String> type_name = 0,
|
||||
uint32_t version = 0) {
|
||||
AssetHeaderBuilder builder_(_fbb);
|
||||
builder_.add_version(version);
|
||||
builder_.add_type_name(type_name);
|
||||
builder_.add_type_id(type_id);
|
||||
builder_.add_name(name);
|
||||
builder_.add_uuid(uuid);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct AssetHeader::Traits {
|
||||
using type = AssetHeader;
|
||||
static auto constexpr Create = CreateAssetHeader;
|
||||
};
|
||||
|
||||
::flatbuffers::Offset<AssetHeader> CreateAssetHeader(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
inline AssetHeaderT *AssetHeader::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
auto _o = std::make_unique<AssetHeaderT>();
|
||||
UnPackTo(_o.get(), _resolver);
|
||||
return _o.release();
|
||||
}
|
||||
|
||||
inline void AssetHeader::UnPackTo(AssetHeaderT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
(void)_o;
|
||||
(void)_resolver;
|
||||
{ auto _e = uuid(); if (_e) _o->uuid = ::flatbuffers::UnPack(*_e); }
|
||||
{ auto _e = name(); if (_e) _o->name = eastl::string(_e->c_str(), _e->size()); }
|
||||
{ auto _e = type_id(); if (_e) _o->type_id = ::flatbuffers::UnPack(*_e); }
|
||||
{ auto _e = type_name(); if (_e) _o->type_name = eastl::string(_e->c_str(), _e->size()); }
|
||||
{ auto _e = version(); _o->version = _e; }
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetHeader> CreateAssetHeader(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
return AssetHeader::Pack(_fbb, _o, _rehasher);
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetHeader> AssetHeader::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
(void)_rehasher;
|
||||
(void)_o;
|
||||
struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetHeaderT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
|
||||
auto _uuid = ::flatbuffers::Pack(_o->uuid);
|
||||
auto _name = _fbb.CreateString(_o->name);
|
||||
auto _type_id = ::flatbuffers::Pack(_o->type_id);
|
||||
auto _type_name = _fbb.CreateString(_o->type_name);
|
||||
auto _version = _o->version;
|
||||
return Bigfoot::Flat::CreateAssetHeader(
|
||||
_fbb,
|
||||
&_uuid,
|
||||
_name,
|
||||
&_type_id,
|
||||
_type_name,
|
||||
_version);
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetHeaderTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
||||
{ ::flatbuffers::ET_STRING, 0, -1 },
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 1 },
|
||||
{ ::flatbuffers::ET_STRING, 0, -1 },
|
||||
{ ::flatbuffers::ET_UINT, 0, -1 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Bigfoot::Flat::UUIDTypeTable,
|
||||
Bigfoot::Flat::AssetTypeIDTypeTable
|
||||
};
|
||||
static const char * const names[] = {
|
||||
"uuid",
|
||||
"name",
|
||||
"type_id",
|
||||
"type_name",
|
||||
"version"
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const Bigfoot::Flat::AssetHeader *GetAssetHeader(const void *buf) {
|
||||
return ::flatbuffers::GetRoot<Bigfoot::Flat::AssetHeader>(buf);
|
||||
}
|
||||
|
||||
inline const Bigfoot::Flat::AssetHeader *GetSizePrefixedAssetHeader(const void *buf) {
|
||||
return ::flatbuffers::GetSizePrefixedRoot<Bigfoot::Flat::AssetHeader>(buf);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifyAssetHeaderBuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifyBuffer<Bigfoot::Flat::AssetHeader>(nullptr);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifySizePrefixedAssetHeaderBuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifySizePrefixedBuffer<Bigfoot::Flat::AssetHeader>(nullptr);
|
||||
}
|
||||
|
||||
inline const char *AssetHeaderExtension() {
|
||||
return "bfbs";
|
||||
}
|
||||
|
||||
inline void FinishAssetHeaderBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Bigfoot::Flat::AssetHeader> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedAssetHeaderBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Bigfoot::Flat::AssetHeader> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Bigfoot::Flat::AssetHeaderT> UnPackAssetHeader(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Bigfoot::Flat::AssetHeaderT>(GetAssetHeader(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Bigfoot::Flat::AssetHeaderT> UnPackSizePrefixedAssetHeader(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Bigfoot::Flat::AssetHeaderT>(GetSizePrefixedAssetHeader(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
} // namespace Flat
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_ASSETHEADER_BIGFOOT_FLAT_H_
|
||||
Binary file not shown.
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* Auto-generated header from: AssetTypeID.bfbs
|
||||
* Generated by Bin2CPP
|
||||
*
|
||||
* DO NOT TOUCH
|
||||
*/
|
||||
#ifndef ASSETTYPEID_BFBS_HPP
|
||||
#define ASSETTYPEID_BFBS_HPP
|
||||
#include <EASTL/array.h>
|
||||
#include <cstddef>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
inline constexpr eastl::array<std::byte, 288> g_AssetTypeID_bfbs = {
|
||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x80}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x3C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x34}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x11}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x54}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x49},
|
||||
std::byte{0x44}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x54}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x49}, std::byte{0x44}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x76}, std::byte{0x61}, std::byte{0x6C}, std::byte{0x75}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}
|
||||
};
|
||||
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif // ASSETTYPEID_BFBS_HPP
|
||||
@@ -1,24 +0,0 @@
|
||||
/*********************************************************************
|
||||
* \file AssetTypeID.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date February 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINE_ASSETTYPEID_HPP
|
||||
#define BIGFOOT_ENGINE_ASSETTYPEID_HPP
|
||||
#include <Engine/BigFile/Asset/AssetTypeID_generated.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
using AssetTypeID = std::uint64_t;
|
||||
}
|
||||
|
||||
namespace flatbuffers
|
||||
{
|
||||
Bigfoot::Flat::AssetTypeID Pack(const Bigfoot::AssetTypeID& p_assetTypeID);
|
||||
Bigfoot::AssetTypeID UnPack(const Bigfoot::Flat::AssetTypeID& p_flatAssetTypeID);
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif
|
||||
@@ -4,14 +4,13 @@
|
||||
* \author Romain BOULLARD
|
||||
* \date October 2025
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINE_BIGFILE_HPP
|
||||
#define BIGFOOT_ENGINE_BIGFILE_HPP
|
||||
#ifndef BIGFOOT_ENGINE_BIGFILE_BIGFILE_HPP
|
||||
#define BIGFOOT_ENGINE_BIGFILE_BIGFILE_HPP
|
||||
#include <System/File.hpp>
|
||||
|
||||
#include <Utils/TaggedType.hpp>
|
||||
|
||||
#include <EASTL/span.h>
|
||||
|
||||
#include <sqlite3.h>
|
||||
|
||||
namespace Bigfoot
|
||||
@@ -26,8 +25,8 @@ class BigFile
|
||||
*/
|
||||
BigFile(const File& p_file);
|
||||
|
||||
BigFile(const BigFile& p_bigFile) = default;
|
||||
BigFile(BigFile&& p_bigFile) = default;
|
||||
BigFile(const BigFile& p_bigFile) = delete;
|
||||
BigFile(BigFile&& p_bigFile) = delete;
|
||||
|
||||
/**
|
||||
* Begin a transaction
|
||||
@@ -49,8 +48,8 @@ class BigFile
|
||||
|
||||
~BigFile();
|
||||
|
||||
BigFile& operator=(const BigFile& p_bigFile) = default;
|
||||
BigFile& operator=(BigFile&& p_bigFile) = default;
|
||||
BigFile& operator=(const BigFile& p_bigFile) = delete;
|
||||
BigFile& operator=(BigFile&& p_bigFile) = delete;
|
||||
|
||||
class Request
|
||||
{
|
||||
@@ -63,8 +62,8 @@ class BigFile
|
||||
*/
|
||||
Request(const BigFile& p_bigFile, const eastl::string_view p_request);
|
||||
|
||||
Request(const Request& p_request) = default;
|
||||
Request(Request&& p_request) = default;
|
||||
Request(const Request& p_request) = delete;
|
||||
Request(Request&& p_request) = delete;
|
||||
|
||||
using CopyValue = TaggedType<bool>;
|
||||
|
||||
@@ -92,6 +91,14 @@ class BigFile
|
||||
*/
|
||||
void Bind(const std::uint32_t p_index, const std::int64_t p_value);
|
||||
|
||||
/*
|
||||
* Bind a uint64 value to the Request at index
|
||||
*
|
||||
* \param p_index The index to bind to
|
||||
* \param p_value The value
|
||||
*/
|
||||
void Bind(const std::uint32_t p_index, const std::uint64_t p_value);
|
||||
|
||||
/*
|
||||
* Bind a float value to the Request at index
|
||||
*
|
||||
@@ -186,6 +193,13 @@ class BigFile
|
||||
*/
|
||||
operator std::int64_t() const;
|
||||
|
||||
/*
|
||||
* Get value as a uint64
|
||||
*
|
||||
* \return The value
|
||||
*/
|
||||
operator std::uint64_t() const;
|
||||
|
||||
/*
|
||||
* Get value as a float
|
||||
*
|
||||
@@ -236,8 +250,8 @@ class BigFile
|
||||
|
||||
~Request();
|
||||
|
||||
Request& operator=(const Request& p_request) = default;
|
||||
Request& operator=(Request&& p_request) = default;
|
||||
Request& operator=(const Request& p_request) = delete;
|
||||
Request& operator=(Request&& p_request) = delete;
|
||||
|
||||
private:
|
||||
/*
|
||||
|
||||
@@ -6,16 +6,14 @@
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINE_ENGINEASSERTHANDLER_HPP
|
||||
#define BIGFOOT_ENGINE_ENGINEASSERTHANDLER_HPP
|
||||
#include <Utils/Assert.hpp>
|
||||
|
||||
#include <Engine/EngineLogger_generated.hpp>
|
||||
|
||||
#include <Utils/Assert.hpp>
|
||||
|
||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||
#include <EASTL/utility.h>
|
||||
|
||||
#include <format>
|
||||
#include <source_location>
|
||||
#include <string_view>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
@@ -33,23 +31,18 @@ class EngineAssertHandler
|
||||
* Handle an assertion.
|
||||
*
|
||||
* \param p_location Location of the assertion.
|
||||
* \param p_stacktrace The stack trace
|
||||
* \param p_format Format string for the assertion message.
|
||||
* \param p_args Arguments for the format string.
|
||||
*/
|
||||
template<typename... ARGS>
|
||||
static void Handle(const std::source_location& p_location,
|
||||
const std::string_view p_stacktrace,
|
||||
std::format_string<ARGS...> p_format,
|
||||
ARGS&&... p_args)
|
||||
static void Handle(const std::source_location& p_location, std::format_string<ARGS...> p_format, ARGS&&... p_args)
|
||||
{
|
||||
BIGFOOT_LOG_FATAL(ENGINE_LOGGER,
|
||||
"Assert: {} (File:{}, Line:{}, Function:{}\n{}",
|
||||
"Assert: {} (File:{}, Line:{}, Function:{}\n",
|
||||
std::format(p_format, std::forward<ARGS>(p_args)...),
|
||||
p_location.file_name(),
|
||||
p_location.line(),
|
||||
p_location.function_name(),
|
||||
p_stacktrace);
|
||||
p_location.function_name());
|
||||
}
|
||||
|
||||
EngineAssertHandler& operator=(const EngineAssertHandler& p_handler) = delete;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINELOGGER_GENERATED_HPP
|
||||
#define BIGFOOT_ENGINELOGGER_GENERATED_HPP
|
||||
#include <System/Log/Log.hpp>
|
||||
#include <Utils/Log/LogMacros.hpp>
|
||||
|
||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
project(${PackageName})
|
||||
|
||||
set(PublicDependencies
|
||||
$<$<CONFIG:Debug,RelWithDebInfo>:quill::quill>
|
||||
$<IF:$<BOOL:${ASAN}>,mimalloc-asan,mimalloc-static>
|
||||
stduuid::stduuid)
|
||||
set(PrivateDependencies)
|
||||
set(BigfootPublicDependencies
|
||||
@@ -18,10 +16,3 @@ bigfoot_create_package_lib(
|
||||
"")
|
||||
|
||||
bigfoot_create_logger()
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
$<$<CONFIG:Debug,RelWithDebInfo>:QUILL_NO_EXCEPTIONS>
|
||||
$<$<CONFIG:Debug,RelWithDebInfo>:QUILL_DISABLE_NON_PREFIXED_MACROS>)
|
||||
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/MimallocImpl.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
|
||||
|
||||
|
||||
@@ -37,21 +37,21 @@ bool File::Exists() const
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
eastl::string_view File::Path() const
|
||||
eastl::string_view File::GetPath() const
|
||||
{
|
||||
return m_pathString;
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
File File::Absolute() const
|
||||
File File::ToAbsolute() const
|
||||
{
|
||||
return File {std::filesystem::absolute(m_path)};
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
File File::Relative() const
|
||||
File File::ToRelative() const
|
||||
{
|
||||
return File {std::filesystem::relative(m_path)};
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ class File
|
||||
* \return The path
|
||||
*/
|
||||
[[nodiscard]]
|
||||
eastl::string_view Path() const;
|
||||
eastl::string_view GetPath() const;
|
||||
|
||||
/**
|
||||
* Get the same file, relative to the current executable
|
||||
@@ -65,7 +65,7 @@ class File
|
||||
* \return The relative file
|
||||
*/
|
||||
[[nodiscard]]
|
||||
File Relative() const;
|
||||
File ToRelative() const;
|
||||
|
||||
/**
|
||||
* Get the same file, with an absolute path
|
||||
@@ -73,7 +73,7 @@ class File
|
||||
* \return The absolute file
|
||||
*/
|
||||
[[nodiscard]]
|
||||
File Absolute() const;
|
||||
File ToAbsolute() const;
|
||||
|
||||
~File() = default;
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,63 +0,0 @@
|
||||
/**
|
||||
* Auto-generated header from: Log.bfbs
|
||||
* Generated by Bin2CPP
|
||||
*
|
||||
* DO NOT TOUCH
|
||||
*/
|
||||
#ifndef LOG_BFBS_HPP
|
||||
#define LOG_BFBS_HPP
|
||||
#include <EASTL/array.h>
|
||||
#include <cstddef>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
inline constexpr eastl::array<std::byte, 704> g_Log_bfbs = {
|
||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x38}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xBC}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0xB4}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x7E}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x98}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x5C}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x34}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0xC4}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x88}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x54}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x15}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x4C}, std::byte{0x65}, std::byte{0x76}, std::byte{0x65}, std::byte{0x6C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x74}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x58}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x43}, std::byte{0x72}, std::byte{0x69}, std::byte{0x74}, std::byte{0x69}, std::byte{0x63}, std::byte{0x61}, std::byte{0x6C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x6C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x8C}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x45}, std::byte{0x72}, std::byte{0x72}, std::byte{0x6F}, std::byte{0x72}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xD4}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0xB8}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x57}, std::byte{0x61}, std::byte{0x72}, std::byte{0x6E}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xF0}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x49}, std::byte{0x6E}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x54}, std::byte{0x72}, std::byte{0x61}, std::byte{0x63}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x5C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x50}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x44}, std::byte{0x65}, std::byte{0x62}, std::byte{0x75}, std::byte{0x67}, std::byte{0x00}, std::byte{0x12}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00},
|
||||
std::byte{0x12}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x4C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x09}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62},
|
||||
std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x53}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x6B}, std::byte{0x54}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x43}, std::byte{0x6F}, std::byte{0x6E}, std::byte{0x73}, std::byte{0x6F}, std::byte{0x6C}, std::byte{0x65}, std::byte{0x00}
|
||||
};
|
||||
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif // LOG_BFBS_HPP
|
||||
@@ -1,50 +0,0 @@
|
||||
/**
|
||||
* Auto-generated header from: Log.fbs
|
||||
* Generated by Bin2CPP
|
||||
*
|
||||
* DO NOT TOUCH
|
||||
*/
|
||||
#ifndef LOG_FBS_HPP
|
||||
#define LOG_FBS_HPP
|
||||
#include <EASTL/array.h>
|
||||
#include <cstddef>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
inline constexpr eastl::array<std::byte, 154> g_Log_fbs = {
|
||||
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{0x65}, std::byte{0x6E}, std::byte{0x75}, std::byte{0x6D}, std::byte{0x20},
|
||||
std::byte{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x53}, std::byte{0x69},
|
||||
std::byte{0x6E}, std::byte{0x6B}, std::byte{0x54}, std::byte{0x79}, std::byte{0x70},
|
||||
std::byte{0x65}, std::byte{0x3A}, std::byte{0x20}, std::byte{0x62}, std::byte{0x79},
|
||||
std::byte{0x74}, std::byte{0x65}, std::byte{0x0A}, std::byte{0x7B}, std::byte{0x0A},
|
||||
std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x43},
|
||||
std::byte{0x6F}, std::byte{0x6E}, std::byte{0x73}, std::byte{0x6F}, std::byte{0x6C},
|
||||
std::byte{0x65}, std::byte{0x0A}, std::byte{0x7D}, std::byte{0x0A}, std::byte{0x0A},
|
||||
std::byte{0x65}, std::byte{0x6E}, std::byte{0x75}, std::byte{0x6D}, std::byte{0x20},
|
||||
std::byte{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x4C}, std::byte{0x65},
|
||||
std::byte{0x76}, std::byte{0x65}, std::byte{0x6C}, std::byte{0x3A}, std::byte{0x20},
|
||||
std::byte{0x62}, std::byte{0x79}, std::byte{0x74}, std::byte{0x65}, std::byte{0x0A},
|
||||
std::byte{0x7B}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20},
|
||||
std::byte{0x20}, std::byte{0x44}, std::byte{0x65}, std::byte{0x62}, std::byte{0x75},
|
||||
std::byte{0x67}, std::byte{0x2C}, std::byte{0x0A}, std::byte{0x20}, std::byte{0x20},
|
||||
std::byte{0x20}, std::byte{0x20}, std::byte{0x54}, std::byte{0x72}, std::byte{0x61},
|
||||
std::byte{0x63}, std::byte{0x65}, std::byte{0x2C}, std::byte{0x0A}, std::byte{0x20},
|
||||
std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x49}, std::byte{0x6E},
|
||||
std::byte{0x66}, std::byte{0x6F}, std::byte{0x2C}, std::byte{0x0A}, std::byte{0x20},
|
||||
std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x57}, std::byte{0x61},
|
||||
std::byte{0x72}, std::byte{0x6E}, std::byte{0x2C}, std::byte{0x0A}, std::byte{0x20},
|
||||
std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x45}, std::byte{0x72},
|
||||
std::byte{0x72}, std::byte{0x6F}, std::byte{0x72}, std::byte{0x2C}, std::byte{0x0A},
|
||||
std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x20}, std::byte{0x43},
|
||||
std::byte{0x72}, std::byte{0x69}, std::byte{0x74}, std::byte{0x69}, std::byte{0x63},
|
||||
std::byte{0x61}, std::byte{0x6C}, std::byte{0x0A}, std::byte{0x7D}
|
||||
};
|
||||
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif // LOG_FBS_HPP
|
||||
@@ -1,63 +0,0 @@
|
||||
/**
|
||||
* Auto-generated header from: Log.bfbs
|
||||
* Generated by Bin2CPP
|
||||
*
|
||||
* DO NOT TOUCH
|
||||
*/
|
||||
#ifndef LOG_BFBS_HPP
|
||||
#define LOG_BFBS_HPP
|
||||
#include <EASTL/array.h>
|
||||
#include <cstddef>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
inline constexpr eastl::array<std::byte, 704> g_Log_bfbs = {
|
||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x38}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xBC}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0xB4}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x7E}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x98}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x5C}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x34}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0xC4}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x88}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x54}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x15}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x4C}, std::byte{0x65}, std::byte{0x76}, std::byte{0x65}, std::byte{0x6C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x74}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x58}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x43}, std::byte{0x72}, std::byte{0x69}, std::byte{0x74}, std::byte{0x69}, std::byte{0x63}, std::byte{0x61}, std::byte{0x6C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x6C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x8C}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x45}, std::byte{0x72}, std::byte{0x72}, std::byte{0x6F}, std::byte{0x72}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xD4}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0xB8}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x57}, std::byte{0x61}, std::byte{0x72}, std::byte{0x6E}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xF0}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x49}, std::byte{0x6E}, std::byte{0x66}, std::byte{0x6F}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x54}, std::byte{0x72}, std::byte{0x61}, std::byte{0x63}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x5C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x50}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x44}, std::byte{0x65}, std::byte{0x62}, std::byte{0x75}, std::byte{0x67}, std::byte{0x00}, std::byte{0x12}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00},
|
||||
std::byte{0x12}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x4C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x09}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62},
|
||||
std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x4C}, std::byte{0x6F}, std::byte{0x67}, std::byte{0x53}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x6B}, std::byte{0x54}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x43}, std::byte{0x6F}, std::byte{0x6E}, std::byte{0x73}, std::byte{0x6F}, std::byte{0x6C}, std::byte{0x65}, std::byte{0x00}
|
||||
};
|
||||
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif // LOG_BFBS_HPP
|
||||
@@ -6,16 +6,14 @@
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_SYSTEM_SYSTEMASSERTHANDLER_HPP
|
||||
#define BIGFOOT_SYSTEM_SYSTEMASSERTHANDLER_HPP
|
||||
#include <Utils/Assert.hpp>
|
||||
|
||||
#include <System/SystemLogger_generated.hpp>
|
||||
|
||||
#include <Utils/Assert.hpp>
|
||||
|
||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||
#include <EASTL/utility.h>
|
||||
|
||||
#include <format>
|
||||
#include <source_location>
|
||||
#include <string_view>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
@@ -33,23 +31,18 @@ class SystemAssertHandler
|
||||
* Handle an assertion.
|
||||
*
|
||||
* \param p_location Location of the assertion.
|
||||
* \param p_stacktrace The stack trace
|
||||
* \param p_format Format string for the assertion message.
|
||||
* \param p_args Arguments for the format string.
|
||||
*/
|
||||
template<typename... ARGS>
|
||||
static void Handle(const std::source_location& p_location,
|
||||
const std::string_view p_stacktrace,
|
||||
std::format_string<ARGS...> p_format,
|
||||
ARGS&&... p_args)
|
||||
static void Handle(const std::source_location& p_location, std::format_string<ARGS...> p_format, ARGS&&... p_args)
|
||||
{
|
||||
BIGFOOT_LOG_FATAL(SYSTEM_LOGGER,
|
||||
"Assert: {} (File:{}, Line:{}, Function:{}\n{}",
|
||||
"Assert: {} (File:{}, Line:{}, Function:{}\n",
|
||||
std::format(p_format, std::forward<ARGS>(p_args)...),
|
||||
p_location.file_name(),
|
||||
p_location.line(),
|
||||
p_location.function_name(),
|
||||
p_stacktrace);
|
||||
p_location.function_name());
|
||||
}
|
||||
|
||||
SystemAssertHandler& operator=(const SystemAssertHandler& p_handler) = delete;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_SYSTEMLOGGER_GENERATED_HPP
|
||||
#define BIGFOOT_SYSTEMLOGGER_GENERATED_HPP
|
||||
#include <System/Log/Log.hpp>
|
||||
#include <Utils/Log/LogMacros.hpp>
|
||||
|
||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* Auto-generated header from: Time.bfbs
|
||||
* Generated by Bin2CPP
|
||||
*
|
||||
* DO NOT TOUCH
|
||||
*/
|
||||
#ifndef TIME_BFBS_HPP
|
||||
#define TIME_BFBS_HPP
|
||||
#include <EASTL/array.h>
|
||||
#include <cstddef>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
inline constexpr eastl::array<std::byte, 272> g_Time_bfbs = {
|
||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x90}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x3C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x0A}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x54}, std::byte{0x69}, std::byte{0x6D}, std::byte{0x65}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x11}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x54}, std::byte{0x69}, std::byte{0x6D}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x65}, std::byte{0x70}, std::byte{0x6F}, std::byte{0x63}, std::byte{0x68}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}
|
||||
};
|
||||
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif // TIME_BFBS_HPP
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Bigfoot.Flat;
|
||||
native_include "System/Time/Time.hpp";
|
||||
|
||||
namespace Flat.Bigfoot;
|
||||
|
||||
struct Time (native_type: "::Bigfoot::Time")
|
||||
{
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
* \author Romain BOULLARD
|
||||
* \date December 2025
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_SYSTEM_TIME_HPP
|
||||
#define BIGFOOT_SYSTEM_TIME_HPP
|
||||
#include <System/Time/Time_generated.hpp>
|
||||
|
||||
#ifndef BIGFOOT_SYSTEM_TIME_TIME_HPP
|
||||
#define BIGFOOT_SYSTEM_TIME_TIME_HPP
|
||||
#include <chrono>
|
||||
#include <compare>
|
||||
#include <cstdint>
|
||||
@@ -23,28 +21,28 @@ class Time
|
||||
Time(Time&& p_time) = default;
|
||||
|
||||
[[nodiscard]]
|
||||
std::uint32_t Year() const;
|
||||
std::uint32_t GetYear() const;
|
||||
|
||||
[[nodiscard]]
|
||||
std::uint32_t Month() const;
|
||||
std::uint32_t GetMonth() const;
|
||||
|
||||
[[nodiscard]]
|
||||
std::uint32_t Day() const;
|
||||
std::uint32_t GetDay() const;
|
||||
|
||||
[[nodiscard]]
|
||||
std::uint32_t Hour() const;
|
||||
std::uint32_t GetHour() const;
|
||||
|
||||
[[nodiscard]]
|
||||
std::uint32_t Minute() const;
|
||||
std::uint32_t GetMinute() const;
|
||||
|
||||
[[nodiscard]]
|
||||
std::uint32_t Second() const;
|
||||
std::uint32_t GetSecond() const;
|
||||
|
||||
[[nodiscard]]
|
||||
std::uint32_t Microsecond() const;
|
||||
std::uint32_t GetMicrosecond() const;
|
||||
|
||||
[[nodiscard]]
|
||||
std::uint64_t Epoch() const;
|
||||
std::uint64_t GetEpoch() const;
|
||||
|
||||
~Time() = default;
|
||||
|
||||
@@ -69,10 +67,20 @@ class Time
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
namespace Flat
|
||||
{
|
||||
namespace Bigfoot
|
||||
{
|
||||
struct Time;
|
||||
}
|
||||
} // namespace Flat
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
namespace flatbuffers
|
||||
{
|
||||
Bigfoot::Flat::Time Pack(const Bigfoot::Time& p_time);
|
||||
Bigfoot::Time UnPack(const Bigfoot::Flat::Time& p_flatTime);
|
||||
Flat::Bigfoot::Time Pack(const Bigfoot::Time& p_time);
|
||||
Bigfoot::Time UnPack(const Flat::Bigfoot::Time& p_flatTime);
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_TIME_BIGFOOT_FLAT_H_
|
||||
#define FLATBUFFERS_GENERATED_TIME_BIGFOOT_FLAT_H_
|
||||
#ifndef FLATBUFFERS_GENERATED_TIME_FLAT_BIGFOOT_H_
|
||||
#define FLATBUFFERS_GENERATED_TIME_FLAT_BIGFOOT_H_
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
@@ -13,11 +13,14 @@ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 19,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "System/Time/Time.hpp"
|
||||
|
||||
#include "EASTL/unique_ptr.h"
|
||||
#include "EASTL/string.h"
|
||||
#include "EASTL/vector.h"
|
||||
|
||||
namespace Bigfoot {
|
||||
namespace Flat {
|
||||
namespace Bigfoot {
|
||||
|
||||
struct Time;
|
||||
|
||||
@@ -33,7 +36,7 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Time FLATBUFFERS_FINAL_CLASS {
|
||||
return TimeTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.Time";
|
||||
return "Flat.Bigfoot.Time";
|
||||
}
|
||||
Time()
|
||||
: epoch_(0) {
|
||||
@@ -56,16 +59,13 @@ inline const ::flatbuffers::TypeTable *TimeTypeTable() {
|
||||
{ ::flatbuffers::ET_ULONG, 0, -1 }
|
||||
};
|
||||
static const int64_t values[] = { 0, 8 };
|
||||
static const char * const names[] = {
|
||||
"epoch"
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_STRUCT, 1, type_codes, nullptr, nullptr, values, names
|
||||
::flatbuffers::ST_STRUCT, 1, type_codes, nullptr, nullptr, values, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
} // namespace Flat
|
||||
} // namespace Bigfoot
|
||||
} // namespace Flat
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_TIME_BIGFOOT_FLAT_H_
|
||||
#endif // FLATBUFFERS_GENERATED_TIME_FLAT_BIGFOOT_H_
|
||||
|
||||
Binary file not shown.
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* Auto-generated header from: UUID.bfbs
|
||||
* Generated by Bin2CPP
|
||||
*
|
||||
* DO NOT TOUCH
|
||||
*/
|
||||
#ifndef UUID_BFBS_HPP
|
||||
#define UUID_BFBS_HPP
|
||||
#include <EASTL/array.h>
|
||||
#include <cstddef>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
inline constexpr eastl::array<std::byte, 280> g_UUID_bfbs = {
|
||||
std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x14}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x3C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x34}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x90}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x3C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x2F}, std::byte{0x2F}, std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x11}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00},
|
||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x10}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00},
|
||||
std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x11}, std::byte{0x04}, std::byte{0x10}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x62}, std::byte{0x79}, std::byte{0x74}, std::byte{0x65}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}
|
||||
};
|
||||
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif // UUID_BFBS_HPP
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Bigfoot.Flat;
|
||||
native_include "System/UUID/UUID.hpp";
|
||||
|
||||
namespace Flat.Bigfoot;
|
||||
|
||||
struct UUID (native_type: "::Bigfoot::UUID")
|
||||
{
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
* \author Romain BOULLARD
|
||||
* \date October 2025
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_SYSTEM_UUID_HPP
|
||||
#define BIGFOOT_SYSTEM_UUID_HPP
|
||||
#include <System/UUID/UUID_generated.hpp>
|
||||
|
||||
#ifndef BIGFOOT_SYSTEM_UUID_UUID_HPP
|
||||
#define BIGFOOT_SYSTEM_UUID_UUID_HPP
|
||||
#include <uuid.h>
|
||||
|
||||
namespace Bigfoot
|
||||
@@ -36,19 +34,31 @@ class UUID
|
||||
UUID(const UUID& p_uuid) = default;
|
||||
UUID(UUID&& p_uuid) noexcept = default;
|
||||
|
||||
/**
|
||||
* Gets the raw bytes of a UUID
|
||||
*
|
||||
* \return A view to the raw bytes
|
||||
*/
|
||||
[[nodiscard]]
|
||||
std::span<const std::byte, UUID_BYTE_SIZE> ToBytes() const;
|
||||
|
||||
/**
|
||||
* Gets the string representation of a UUID
|
||||
*
|
||||
* \return A string representing the UUID
|
||||
*/
|
||||
[[nodiscard]]
|
||||
std::string ToString() const;
|
||||
|
||||
~UUID() = default;
|
||||
|
||||
operator std::span<const std::byte, UUID_BYTE_SIZE>() const;
|
||||
operator std::string() const;
|
||||
operator bool() const;
|
||||
|
||||
UUID& operator=(const UUID& p_uuid) = default;
|
||||
UUID& operator=(UUID&& p_uuid) noexcept = default;
|
||||
|
||||
[[nodiscard]]
|
||||
bool operator==(const UUID& p_uuid) const = default;
|
||||
[[nodiscard]]
|
||||
bool operator!=(const UUID& p_uuid) const = default;
|
||||
bool operator==(const UUID& p_uuid) const;
|
||||
[[nodiscard]]
|
||||
bool operator<(const UUID& p_uuid) const;
|
||||
|
||||
@@ -115,7 +125,7 @@ struct std::formatter<Bigfoot::UUID, char>
|
||||
template<typename FormatContext>
|
||||
auto format(const Bigfoot::UUID& p_uuid, FormatContext& ctx) const
|
||||
{
|
||||
return std::format_to(ctx.out(), "{}", static_cast<std::string>(p_uuid));
|
||||
return std::format_to(ctx.out(), "{}", p_uuid.ToString());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -134,7 +144,7 @@ struct fmtquill::formatter<Bigfoot::UUID>
|
||||
|
||||
auto format(const Bigfoot::UUID& p_uuid, format_context& ctx) const
|
||||
{
|
||||
return fmtquill::format_to(ctx.out(), "{}", static_cast<std::string>(p_uuid));
|
||||
return fmtquill::format_to(ctx.out(), "{}", p_uuid.ToString());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -146,10 +156,20 @@ struct quill::Codec<Bigfoot::UUID>: quill::DeferredFormatCodec<Bigfoot::UUID>
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
namespace Flat
|
||||
{
|
||||
namespace Bigfoot
|
||||
{
|
||||
struct UUID;
|
||||
}
|
||||
} // namespace Flat
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
namespace flatbuffers
|
||||
{
|
||||
Bigfoot::Flat::UUID Pack(const Bigfoot::UUID& p_uuid);
|
||||
Bigfoot::UUID UnPack(const Bigfoot::Flat::UUID& p_flatUUID);
|
||||
Flat::Bigfoot::UUID Pack(const Bigfoot::UUID& p_uuid);
|
||||
Bigfoot::UUID UnPack(const Flat::Bigfoot::UUID& p_flatUUID);
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_UUID_BIGFOOT_FLAT_H_
|
||||
#define FLATBUFFERS_GENERATED_UUID_BIGFOOT_FLAT_H_
|
||||
#ifndef FLATBUFFERS_GENERATED_UUID_FLAT_BIGFOOT_H_
|
||||
#define FLATBUFFERS_GENERATED_UUID_FLAT_BIGFOOT_H_
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
@@ -13,11 +13,14 @@ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 19,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "System/UUID/UUID.hpp"
|
||||
|
||||
#include "EASTL/unique_ptr.h"
|
||||
#include "EASTL/string.h"
|
||||
#include "EASTL/vector.h"
|
||||
|
||||
namespace Bigfoot {
|
||||
namespace Flat {
|
||||
namespace Bigfoot {
|
||||
|
||||
struct UUID;
|
||||
|
||||
@@ -33,7 +36,7 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) UUID FLATBUFFERS_FINAL_CLASS {
|
||||
return UUIDTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.UUID";
|
||||
return "Flat.Bigfoot.UUID";
|
||||
}
|
||||
UUID()
|
||||
: bytes_() {
|
||||
@@ -57,16 +60,13 @@ inline const ::flatbuffers::TypeTable *UUIDTypeTable() {
|
||||
};
|
||||
static const int16_t array_sizes[] = { 16, };
|
||||
static const int64_t values[] = { 0, 16 };
|
||||
static const char * const names[] = {
|
||||
"bytes"
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_STRUCT, 1, type_codes, nullptr, array_sizes, values, names
|
||||
::flatbuffers::ST_STRUCT, 1, type_codes, nullptr, array_sizes, values, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
} // namespace Flat
|
||||
} // namespace Bigfoot
|
||||
} // namespace Flat
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_UUID_BIGFOOT_FLAT_H_
|
||||
#endif // FLATBUFFERS_GENERATED_UUID_FLAT_BIGFOOT_H_
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <System/Time/Time.hpp>
|
||||
|
||||
#include <System/SystemAssertHandler.hpp>
|
||||
#include <System/Time/Time_generated.hpp>
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -54,56 +55,56 @@ Time::Time(const std::uint64_t p_epoch):
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
std::uint32_t Time::Year() const
|
||||
std::uint32_t Time::GetYear() const
|
||||
{
|
||||
return m_timeInfo.tm_year + 1900;
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
std::uint32_t Time::Month() const
|
||||
std::uint32_t Time::GetMonth() const
|
||||
{
|
||||
return m_timeInfo.tm_mon + 1;
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
std::uint32_t Time::Day() const
|
||||
std::uint32_t Time::GetDay() const
|
||||
{
|
||||
return m_timeInfo.tm_mday;
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
std::uint32_t Time::Hour() const
|
||||
std::uint32_t Time::GetHour() const
|
||||
{
|
||||
return m_timeInfo.tm_hour;
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
std::uint32_t Time::Minute() const
|
||||
std::uint32_t Time::GetMinute() const
|
||||
{
|
||||
return m_timeInfo.tm_min;
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
std::uint32_t Time::Second() const
|
||||
std::uint32_t Time::GetSecond() const
|
||||
{
|
||||
return m_timeInfo.tm_sec;
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
std::uint32_t Time::Microsecond() const
|
||||
std::uint32_t Time::GetMicrosecond() const
|
||||
{
|
||||
return static_cast<std::uint32_t>(m_microseconds.count());
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
std::uint64_t Time::Epoch() const
|
||||
std::uint64_t Time::GetEpoch() const
|
||||
{
|
||||
return m_epoch;
|
||||
}
|
||||
@@ -124,14 +125,14 @@ Time Time::Now()
|
||||
|
||||
namespace flatbuffers
|
||||
{
|
||||
Bigfoot::Flat::Time Pack(const Bigfoot::Time& p_time)
|
||||
Flat::Bigfoot::Time Pack(const Bigfoot::Time& p_time)
|
||||
{
|
||||
return Bigfoot::Flat::Time {p_time.Epoch()};
|
||||
return Flat::Bigfoot::Time {p_time.GetEpoch()};
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
Bigfoot::Time UnPack(const Bigfoot::Flat::Time& p_flatTime)
|
||||
Bigfoot::Time UnPack(const Flat::Bigfoot::Time& p_flatTime)
|
||||
{
|
||||
return Bigfoot::Time {p_flatTime.epoch()};
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
*********************************************************************/
|
||||
#include <System/UUID/UUID.hpp>
|
||||
|
||||
#include <System/UUID/UUID_generated.hpp>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
UUID UUID::NULL_UUID {"00000000-0000-0000-0000-000000000000"};
|
||||
@@ -41,14 +43,14 @@ UUID::UUID(const std::span<const std::byte, UUID_BYTE_SIZE> p_raw)
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
UUID::operator std::span<const std::byte, UUID::UUID_BYTE_SIZE>() const
|
||||
std::span<const std::byte, UUID::UUID_BYTE_SIZE> UUID::ToBytes() const
|
||||
{
|
||||
return m_uuid.as_bytes();
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
UUID::operator std::string() const
|
||||
std::string UUID::ToString() const
|
||||
{
|
||||
return uuids::to_string(m_uuid);
|
||||
}
|
||||
@@ -60,6 +62,11 @@ UUID::operator bool() const
|
||||
return *this != NULL_UUID;
|
||||
}
|
||||
|
||||
bool UUID::operator==(const UUID& p_uuid) const
|
||||
{
|
||||
return m_uuid == p_uuid.m_uuid;
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
bool UUID::operator<(const UUID& p_uuid) const
|
||||
@@ -90,17 +97,17 @@ uuids::uuid_random_generator UUID::GetUUIDGenerator()
|
||||
|
||||
namespace flatbuffers
|
||||
{
|
||||
Bigfoot::Flat::UUID Pack(const Bigfoot::UUID& p_uuid)
|
||||
Flat::Bigfoot::UUID Pack(const Bigfoot::UUID& p_uuid)
|
||||
{
|
||||
const std::span<const std::byte, Bigfoot::UUID::UUID_BYTE_SIZE> bytes = p_uuid;
|
||||
return Bigfoot::Flat::UUID {
|
||||
const std::span<const std::byte, Bigfoot::UUID::UUID_BYTE_SIZE> bytes = p_uuid.ToBytes();
|
||||
return Flat::Bigfoot::UUID {
|
||||
std::span<const std::uint8_t, Bigfoot::UUID::UUID_BYTE_SIZE> {reinterpret_cast<const std::uint8_t*>(bytes.data()),
|
||||
bytes.size()}};
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
Bigfoot::UUID UnPack(const Bigfoot::Flat::UUID& p_flatUUID)
|
||||
Bigfoot::UUID UnPack(const Flat::Bigfoot::UUID& p_flatUUID)
|
||||
{
|
||||
const std::span<const std::uint8_t, Bigfoot::UUID::UUID_BYTE_SIZE> bytesView {p_flatUUID.bytes()->data(),
|
||||
p_flatUUID.bytes()->size()};
|
||||
|
||||
@@ -2,8 +2,12 @@ get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
project(${PackageName})
|
||||
|
||||
set(PublicDependencies
|
||||
$<$<CONFIG:Debug,RelWithDebInfo>:cpptrace::cpptrace>
|
||||
unordered_dense::unordered_dense)
|
||||
$<$<CONFIG:Debug,RelWithDebInfo>:quill::quill>
|
||||
$<IF:$<BOOL:${ASAN}>,mimalloc-asan,mimalloc-static>
|
||||
unordered_dense::unordered_dense
|
||||
EASTL::EASTL
|
||||
flatbuffers::flatbuffers
|
||||
rapidhash::rapidhash)
|
||||
set(PrivateDependencies)
|
||||
set(BigfootPublicDependencies)
|
||||
set(BigfootPrivateDependencies)
|
||||
@@ -13,4 +17,12 @@ bigfoot_create_package_lib(
|
||||
"${PrivateLibraries}"
|
||||
"${BigfootPublicDependencies}"
|
||||
"${BigfootPrivateDependencies}"
|
||||
"")
|
||||
"")
|
||||
set_source_files_properties(../Utils/MimallocImpl.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
|
||||
|
||||
bigfoot_create_logger()
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
$<$<CONFIG:Debug,RelWithDebInfo>:QUILL_NO_EXCEPTIONS>
|
||||
$<$<CONFIG:Debug,RelWithDebInfo>:QUILL_DISABLE_NON_PREFIXED_MACROS>)
|
||||
@@ -4,14 +4,12 @@
|
||||
* \author Romain BOULLARD
|
||||
* \date October 2025
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_SYSTEM_ASSERT_HPP
|
||||
#define BIGFOOT_SYSTEM_ASSERT_HPP
|
||||
#include <System/Log/Log.hpp>
|
||||
#ifndef BIGFOOT_UTILS_ASSERT_HPP
|
||||
#define BIGFOOT_UTILS_ASSERT_HPP
|
||||
#include <Utils/Log/LogMacros.hpp>
|
||||
|
||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||
|
||||
#include <cpptrace/cpptrace.hpp>
|
||||
|
||||
#include <source_location>
|
||||
#include <string>
|
||||
|
||||
@@ -39,13 +37,7 @@
|
||||
constexpr std::source_location location = std::source_location::current(); \
|
||||
if (!(p_assert)) [[unlikely]] \
|
||||
{ \
|
||||
constexpr auto stacktrace = []() -> std::string \
|
||||
{ \
|
||||
const cpptrace::stacktrace stacktrace = cpptrace::generate_trace(); \
|
||||
return stacktrace.to_string(); \
|
||||
}; \
|
||||
\
|
||||
HANDLER::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
HANDLER::Handle(location, p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
BREAK; \
|
||||
} \
|
||||
} while (false)
|
||||
@@ -56,13 +48,7 @@
|
||||
constexpr std::source_location location = std::source_location::current(); \
|
||||
if (!(p_assert)) [[unlikely]] \
|
||||
{ \
|
||||
constexpr auto stacktrace = []() -> std::string \
|
||||
{ \
|
||||
const cpptrace::stacktrace stacktrace = cpptrace::generate_trace(); \
|
||||
return stacktrace.to_string(); \
|
||||
}; \
|
||||
\
|
||||
HANDLER::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
HANDLER::Handle(location, p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
BREAK; \
|
||||
} \
|
||||
} while (false)
|
||||
@@ -73,16 +59,10 @@
|
||||
constexpr std::source_location location = std::source_location::current(); \
|
||||
if (!(p_assert)) [[unlikely]] \
|
||||
{ \
|
||||
constexpr auto stacktrace = []() -> std::string \
|
||||
{ \
|
||||
const cpptrace::stacktrace stacktrace = cpptrace::generate_trace(); \
|
||||
return stacktrace.to_string(); \
|
||||
}; \
|
||||
\
|
||||
HANDLER::Handle(location, stacktrace(), p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
HANDLER::Handle(location, p_message __VA_OPT__(, ) __VA_ARGS__); \
|
||||
if (Bigfoot::Singleton<Bigfoot::Log>::HasInstance()) \
|
||||
{ \
|
||||
Bigfoot::Singleton<Bigfoot::Log>::Instance().Flush(); \
|
||||
Bigfoot::Singleton<Bigfoot::Log>::GetInstance().Flush(); \
|
||||
} \
|
||||
BREAK; \
|
||||
std::abort(); \
|
||||
|
||||
311
Bigfoot/Sources/Utils/Include/Utils/Containers/SlotMap.hpp
Normal file
311
Bigfoot/Sources/Utils/Include/Utils/Containers/SlotMap.hpp
Normal file
@@ -0,0 +1,311 @@
|
||||
/*********************************************************************
|
||||
* \file SlotMap.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date May 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_UTILS_CONTAINERS_SLOTMAP_HPP
|
||||
#define BIGFOOT_UTILS_CONTAINERS_SLOTMAP_HPP
|
||||
#include <Utils/UtilsAssertHandler.hpp>
|
||||
|
||||
#include <EASTL/vector.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
|
||||
template<class TYPE,
|
||||
class VERSION_TYPE = std::uint32_t,
|
||||
class INDEX_TYPE = std::uint32_t,
|
||||
std::enable_if_t<std::is_unsigned_v<VERSION_TYPE> && std::is_unsigned_v<INDEX_TYPE>, bool> = true>
|
||||
class SlotMap
|
||||
{
|
||||
public:
|
||||
class SlotKey
|
||||
{
|
||||
public:
|
||||
using IndexType = INDEX_TYPE;
|
||||
using VersionType = VERSION_TYPE;
|
||||
|
||||
private:
|
||||
static constexpr std::uint32_t VERSION_BIT_COUNT = sizeof(VersionType) *
|
||||
std::numeric_limits<unsigned char>::digits;
|
||||
static constexpr std::uint32_t INDEX_BIT_COUNT = sizeof(IndexType) * std::numeric_limits<unsigned char>::digits;
|
||||
static_assert(VERSION_BIT_COUNT + INDEX_BIT_COUNT <= 64,
|
||||
"We cant construct a 64 bit key from the given Version and Index types!");
|
||||
|
||||
static constexpr std::uint64_t INDEX_MASK = (static_cast<std::uint64_t>(1) << INDEX_BIT_COUNT) - 1;
|
||||
|
||||
public:
|
||||
static constexpr VersionType INVALID_VERSION = 0;
|
||||
|
||||
static constexpr IndexType MAX_INDEX = std::numeric_limits<IndexType>::max();
|
||||
|
||||
constexpr SlotKey(const VersionType p_version, const IndexType p_index):
|
||||
m_key((static_cast<std::uint64_t>(p_version) << INDEX_BIT_COUNT) |
|
||||
(static_cast<std::uint64_t>(p_index) & INDEX_MASK))
|
||||
{
|
||||
}
|
||||
|
||||
constexpr SlotKey():
|
||||
SlotKey(INVALID_VERSION, 0)
|
||||
{
|
||||
}
|
||||
|
||||
constexpr SlotKey(const SlotKey& p_slotKey) = default;
|
||||
constexpr SlotKey(SlotKey&& p_slotKey) = default;
|
||||
|
||||
constexpr ~SlotKey() = default;
|
||||
|
||||
constexpr bool Valid() const
|
||||
{
|
||||
return GetVersion() != INVALID_VERSION;
|
||||
}
|
||||
|
||||
constexpr VersionType GetVersion() const
|
||||
{
|
||||
return static_cast<VersionType>(m_key >> INDEX_BIT_COUNT);
|
||||
}
|
||||
|
||||
constexpr IndexType GetIndex() const
|
||||
{
|
||||
return static_cast<IndexType>(m_key & INDEX_MASK);
|
||||
}
|
||||
|
||||
constexpr SlotKey& operator=(const SlotKey& p_slotKey) = default;
|
||||
constexpr SlotKey& operator=(SlotKey&& p_slotKey) = default;
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr bool operator==(const SlotKey& p_other) const = default;
|
||||
|
||||
private:
|
||||
std::uint64_t m_key;
|
||||
};
|
||||
|
||||
SlotMap():
|
||||
m_freeSlotHead(std::numeric_limits<typename SlotKey::IndexType>::max())
|
||||
{
|
||||
}
|
||||
|
||||
SlotMap(const SlotMap& p_map) = default;
|
||||
SlotMap(SlotMap&& p_map) = default;
|
||||
|
||||
~SlotMap() = default;
|
||||
|
||||
template<class... ARGS>
|
||||
[[nodiscard]]
|
||||
SlotKey Insert(ARGS&&... p_args)
|
||||
{
|
||||
ASSERT(UtilsAssertHandler, m_slots.size() < SlotKey::MAX_INDEX, "All slots have been exhausted!");
|
||||
|
||||
const typename SlotKey::IndexType dataIndex = static_cast<SlotKey::IndexType>(m_data.size());
|
||||
m_data.emplace_back(std::forward<ARGS>(p_args)...);
|
||||
|
||||
if (HasFreeSlots())
|
||||
{
|
||||
const typename SlotKey::IndexType slotIndex = m_freeSlotHead;
|
||||
|
||||
m_freeSlotHead = m_slots[slotIndex].GetIndex();
|
||||
|
||||
m_slots[slotIndex] = SlotKey {m_slots[slotIndex].GetVersion(), dataIndex};
|
||||
m_dataToSlots.push_back(slotIndex);
|
||||
|
||||
return SlotKey {m_slots[slotIndex].GetVersion(), slotIndex};
|
||||
}
|
||||
|
||||
const typename SlotKey::IndexType slotIndex = static_cast<SlotKey::IndexType>(m_slots.size());
|
||||
m_slots.emplace_back(1, dataIndex);
|
||||
m_dataToSlots.push_back(slotIndex);
|
||||
|
||||
return SlotKey {1, slotIndex};
|
||||
}
|
||||
|
||||
void Remove(const SlotKey p_slotKey)
|
||||
{
|
||||
if (!Has(p_slotKey))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const typename SlotKey::IndexType dataIndex = m_slots[p_slotKey.GetIndex()].GetIndex();
|
||||
|
||||
m_data.erase_unsorted(m_data.begin() + dataIndex);
|
||||
m_dataToSlots.erase_unsorted(m_dataToSlots.begin() + dataIndex);
|
||||
|
||||
if (dataIndex < m_data.size())
|
||||
{
|
||||
m_slots[m_dataToSlots[dataIndex]] = SlotKey {m_slots[m_dataToSlots[dataIndex]].GetVersion(), dataIndex};
|
||||
}
|
||||
|
||||
RecycleSlot(p_slotKey.GetVersion() + 1, p_slotKey.GetIndex());
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
bool Has(const SlotKey p_slotKey) const
|
||||
{
|
||||
return p_slotKey.Valid() && (p_slotKey.GetIndex() < m_slots.size() &&
|
||||
p_slotKey.GetVersion() == m_slots[p_slotKey.GetIndex()].GetVersion());
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
TYPE* Get(const SlotKey p_slotKey)
|
||||
{
|
||||
return Has(p_slotKey) ? &m_data[m_slots[p_slotKey.GetIndex()].GetIndex()] : nullptr;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
const TYPE* Get(const SlotKey p_slotKey) const
|
||||
{
|
||||
return Has(p_slotKey) ? &m_data[m_slots[p_slotKey.GetIndex()].GetIndex()] : nullptr;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_data.clear();
|
||||
m_slots.clear();
|
||||
m_dataToSlots.clear();
|
||||
m_freeSlotHead = std::numeric_limits<typename SlotKey::IndexType>::max();
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
for (const typename eastl::vector<TYPE>::size_type slotIndex: m_dataToSlots)
|
||||
{
|
||||
RecycleSlot(m_slots[slotIndex].GetVersion() + 1, static_cast<SlotKey::IndexType>(slotIndex));
|
||||
}
|
||||
|
||||
m_data.clear();
|
||||
m_dataToSlots.clear();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::size_type GetSize() const
|
||||
{
|
||||
return m_data.size();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::size_type GetCapacity() const
|
||||
{
|
||||
return m_data.capacity();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
bool Empty() const
|
||||
{
|
||||
return m_data.empty();
|
||||
}
|
||||
|
||||
void Reserve(const eastl::vector<TYPE>::size_type p_size)
|
||||
{
|
||||
m_data.reserve(p_size);
|
||||
m_dataToSlots.reserve(p_size);
|
||||
m_slots.reserve(p_size);
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::iterator begin()
|
||||
{
|
||||
return m_data.begin();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::iterator end()
|
||||
{
|
||||
return m_data.end();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::const_iterator begin() const
|
||||
{
|
||||
return m_data.begin();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::const_iterator end() const
|
||||
{
|
||||
return m_data.end();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::reverse_iterator rbegin()
|
||||
{
|
||||
return m_data.rbegin();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::reverse_iterator rend()
|
||||
{
|
||||
return m_data.rend();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::const_reverse_iterator rbegin() const
|
||||
{
|
||||
return m_data.rbegin();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::const_reverse_iterator rend() const
|
||||
{
|
||||
return m_data.rend();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::const_iterator cbegin() const
|
||||
{
|
||||
return m_data.cbegin();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::const_iterator cend() const
|
||||
{
|
||||
return m_data.cend();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::const_reverse_iterator crbegin() const
|
||||
{
|
||||
return m_data.crbegin();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<TYPE>::const_reverse_iterator crend() const
|
||||
{
|
||||
return m_data.crend();
|
||||
}
|
||||
|
||||
SlotMap& operator=(const SlotMap& p_slotMap) = default;
|
||||
SlotMap& operator=(SlotMap&& p_slotMap) = default;
|
||||
|
||||
private:
|
||||
[[nodiscard]]
|
||||
bool HasFreeSlots() const
|
||||
{
|
||||
return m_freeSlotHead != std::numeric_limits<typename SlotKey::IndexType>::max();
|
||||
}
|
||||
|
||||
void RecycleSlot(const SlotKey::VersionType p_version, const SlotKey::IndexType p_slotIndex)
|
||||
{
|
||||
if (p_version == SlotKey::INVALID_VERSION)
|
||||
{
|
||||
m_slots[p_slotIndex] = SlotKey {SlotKey::INVALID_VERSION, 0};
|
||||
return;
|
||||
}
|
||||
|
||||
m_slots[p_slotIndex] = SlotKey {p_version, m_freeSlotHead};
|
||||
m_freeSlotHead = p_slotIndex;
|
||||
}
|
||||
|
||||
eastl::vector<TYPE> m_data;
|
||||
eastl::vector<SlotKey> m_slots;
|
||||
|
||||
eastl::vector<typename eastl::vector<TYPE>::size_type> m_dataToSlots;
|
||||
|
||||
SlotKey::IndexType m_freeSlotHead;
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif
|
||||
@@ -4,19 +4,19 @@
|
||||
* \author Romain BOULLARD
|
||||
* \date December 2025
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_SYSTEM_EASTLFORMATTERS_HPP
|
||||
#define BIGFOOT_SYSTEM_EASTLFORMATTERS_HPP
|
||||
#ifndef BIGFOOT_UTILS_LOG_EASTLFORMATTERS_HPP
|
||||
#define BIGFOOT_UTILS_LOG_EASTLFORMATTERS_HPP
|
||||
#include <Utils/TargetMacros.h>
|
||||
|
||||
#if defined(BIGFOOT_NOT_OPTIMIZED)
|
||||
#include <quill/DeferredFormatCodec.h>
|
||||
#endif
|
||||
|
||||
#include <format>
|
||||
|
||||
#include <EASTL/string.h>
|
||||
#include <EASTL/string_view.h>
|
||||
|
||||
#include <format>
|
||||
|
||||
// STRING
|
||||
|
||||
template<>
|
||||
102
Bigfoot/Sources/Utils/Include/Utils/Log/Log.hpp
Normal file
102
Bigfoot/Sources/Utils/Include/Utils/Log/Log.hpp
Normal file
@@ -0,0 +1,102 @@
|
||||
/*********************************************************************
|
||||
* \file Log.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date October 2025
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_UTILS_LOG_LOG_HPP
|
||||
#define BIGFOOT_UTILS_LOG_LOG_HPP
|
||||
#include <Utils/Log/EASTLFormatters.hpp>
|
||||
|
||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||
#include <Utils/Log/Log_generated.hpp>
|
||||
|
||||
#include <EASTL/array.h>
|
||||
|
||||
#ifdef BIGFOOT_WINDOWS
|
||||
#pragma warning(disable: 4702)
|
||||
#endif
|
||||
#include <quill/Backend.h>
|
||||
#include <quill/Frontend.h>
|
||||
#include <quill/LogMacros.h>
|
||||
#include <quill/Logger.h>
|
||||
#include <quill/sinks/ConsoleSink.h>
|
||||
#if defined BIGFOOT_WINDOWS
|
||||
#pragma warning(default: 4702)
|
||||
#endif
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
class Log
|
||||
{
|
||||
public:
|
||||
struct LoggerInfo
|
||||
{
|
||||
std::string m_name;
|
||||
Flat::LogLevel m_level;
|
||||
};
|
||||
|
||||
Log();
|
||||
|
||||
Log(const Log& p_logger) = delete;
|
||||
Log(Log&& p_logger) = delete;
|
||||
|
||||
/**
|
||||
* Register a logger.
|
||||
*
|
||||
* \param p_loggerInfo The logger to register
|
||||
*/
|
||||
[[nodiscard]]
|
||||
quill::Logger* RegisterLogger(const LoggerInfo& p_loggerInfo);
|
||||
|
||||
/**
|
||||
* Unregister a logger.
|
||||
*
|
||||
* \param p_loggerInfo The logger to unregister
|
||||
*/
|
||||
void UnregisterLogger(const LoggerInfo& p_loggerInfo);
|
||||
|
||||
/**
|
||||
* Register a logger.
|
||||
*
|
||||
* \param p_loggerInfo The logger to get
|
||||
* \return The logger, nullptr if it does not exist
|
||||
*/
|
||||
[[nodiscard]]
|
||||
quill::Logger* GetLogger(const LoggerInfo& p_loggerInfo);
|
||||
|
||||
/**
|
||||
* Changes the loglevel of a Logger.
|
||||
*
|
||||
* \param p_loggerInfo The logger to change
|
||||
* \param p_level The new level
|
||||
*/
|
||||
void ChangeLoggerLogLevel(LoggerInfo& p_loggerInfo, const Flat::LogLevel p_level);
|
||||
|
||||
/*
|
||||
* Flush all the loggers
|
||||
*
|
||||
*/
|
||||
void Flush();
|
||||
|
||||
~Log();
|
||||
|
||||
Log& operator=(const Log& p_logger) = delete;
|
||||
Log& operator=(Log&& p_logger) = delete;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Set the LogLevel of a logger
|
||||
*
|
||||
* \param p_loggerInfo The logger to set
|
||||
*/
|
||||
void SetLoggerLevel(const LoggerInfo& p_loggerInfo);
|
||||
|
||||
/*
|
||||
* The sinks
|
||||
*/
|
||||
eastl::array<std::shared_ptr<quill::Sink>, 1> m_sinks;
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,109 +1,25 @@
|
||||
/*********************************************************************
|
||||
* \file Log.hpp
|
||||
* \file LogMacros.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date October 2025
|
||||
* \date May 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_SYSTEM_LOG_HPP
|
||||
#define BIGFOOT_SYSTEM_LOG_HPP
|
||||
#include <System/Log/EASTLFormatters.hpp>
|
||||
|
||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||
#include <System/Log/Log_generated.hpp>
|
||||
|
||||
#ifndef BIGFOOT_UTILS_LOG_LOGMACROS_HPP
|
||||
#define BIGFOOT_UTILS_LOG_LOGMACROS_HPP
|
||||
#include <Utils/Log/Log.hpp>
|
||||
#include <Utils/Singleton.hpp>
|
||||
|
||||
#include <EASTL/array.h>
|
||||
|
||||
#ifdef BIGFOOT_WINDOWS
|
||||
#pragma warning(disable: 4702)
|
||||
#endif
|
||||
#include <quill/Backend.h>
|
||||
#include <quill/Frontend.h>
|
||||
#include <quill/LogMacros.h>
|
||||
#include <quill/Logger.h>
|
||||
#include <quill/sinks/ConsoleSink.h>
|
||||
#if defined BIGFOOT_WINDOWS
|
||||
#pragma warning(default: 4702)
|
||||
#endif
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
class Log
|
||||
{
|
||||
public:
|
||||
struct LoggerInfo
|
||||
{
|
||||
std::string m_name;
|
||||
Flat::LogLevel m_level;
|
||||
};
|
||||
|
||||
Log();
|
||||
|
||||
Log(const Log& p_logger) = delete;
|
||||
Log(Log&& p_logger) = delete;
|
||||
|
||||
/**
|
||||
* Register a logger.
|
||||
*
|
||||
* \param p_loggerInfo The logger to register
|
||||
*/
|
||||
[[nodiscard]]
|
||||
quill::Logger* RegisterLogger(const LoggerInfo& p_loggerInfo);
|
||||
|
||||
/**
|
||||
* Register a logger.
|
||||
*
|
||||
* \param p_loggerInfo The logger to get
|
||||
* \return The logger, nullptr if it does not exist
|
||||
*/
|
||||
[[nodiscard]]
|
||||
quill::Logger* GetLogger(const LoggerInfo& p_loggerInfo);
|
||||
|
||||
/**
|
||||
* Changes the loglevel of a Logger.
|
||||
*
|
||||
* \param p_loggerInfo The logger to change
|
||||
* \param p_level The new level
|
||||
*/
|
||||
void ChangeLoggerLogLevel(LoggerInfo& p_loggerInfo, const Flat::LogLevel p_level);
|
||||
|
||||
/*
|
||||
* Flush all the loggers
|
||||
*
|
||||
*/
|
||||
void Flush();
|
||||
|
||||
~Log();
|
||||
|
||||
Log& operator=(const Log& p_logger) = delete;
|
||||
Log& operator=(Log&& p_logger) = delete;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Set the LogLevel of a logger
|
||||
*
|
||||
* \param p_loggerInfo The logger to set
|
||||
*/
|
||||
void SetLoggerLevel(const LoggerInfo& p_loggerInfo);
|
||||
|
||||
/*
|
||||
* The sinks
|
||||
*/
|
||||
eastl::array<std::shared_ptr<quill::Sink>, 1> m_sinks;
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
|
||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||
#define BIGFOOT_LOG_DEBUG(loggerName, fmt, ...) \
|
||||
do \
|
||||
{ \
|
||||
if (quill::Logger* logger = Bigfoot::Singleton<Bigfoot::Log>::Instance().GetLogger(loggerName)) \
|
||||
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().GetLogger(loggerName)) \
|
||||
{ \
|
||||
QUILL_LOG_DEBUG(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
QUILL_LOG_DEBUG(Bigfoot::Singleton<Bigfoot::Log>::Instance().RegisterLogger(loggerName), \
|
||||
QUILL_LOG_DEBUG(::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().RegisterLogger(loggerName), \
|
||||
fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -111,13 +27,13 @@ class Log
|
||||
#define BIGFOOT_LOG_TRACE(loggerName, fmt, ...) \
|
||||
do \
|
||||
{ \
|
||||
if (quill::Logger* logger = Bigfoot::Singleton<Bigfoot::Log>::Instance().GetLogger(loggerName)) \
|
||||
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().GetLogger(loggerName)) \
|
||||
{ \
|
||||
QUILL_LOG_TRACE_L3(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
QUILL_LOG_TRACE_L3(Bigfoot::Singleton<Bigfoot::Log>::Instance().RegisterLogger(loggerName), \
|
||||
QUILL_LOG_TRACE_L3(::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().RegisterLogger(loggerName), \
|
||||
fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -125,13 +41,13 @@ class Log
|
||||
#define BIGFOOT_LOG_INFO(loggerName, fmt, ...) \
|
||||
do \
|
||||
{ \
|
||||
if (quill::Logger* logger = Bigfoot::Singleton<Bigfoot::Log>::Instance().GetLogger(loggerName)) \
|
||||
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().GetLogger(loggerName)) \
|
||||
{ \
|
||||
QUILL_LOG_INFO(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
QUILL_LOG_INFO(Bigfoot::Singleton<Bigfoot::Log>::Instance().RegisterLogger(loggerName), \
|
||||
QUILL_LOG_INFO(::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().RegisterLogger(loggerName), \
|
||||
fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -139,13 +55,13 @@ class Log
|
||||
#define BIGFOOT_LOG_WARN(loggerName, fmt, ...) \
|
||||
do \
|
||||
{ \
|
||||
if (quill::Logger* logger = Bigfoot::Singleton<Bigfoot::Log>::Instance().GetLogger(loggerName)) \
|
||||
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().GetLogger(loggerName)) \
|
||||
{ \
|
||||
QUILL_LOG_WARNING(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
QUILL_LOG_WARNING(Bigfoot::Singleton<Bigfoot::Log>::Instance().RegisterLogger(loggerName), \
|
||||
QUILL_LOG_WARNING(::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().RegisterLogger(loggerName), \
|
||||
fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -153,13 +69,13 @@ class Log
|
||||
#define BIGFOOT_LOG_ERROR(loggerName, fmt, ...) \
|
||||
do \
|
||||
{ \
|
||||
if (quill::Logger* logger = Bigfoot::Singleton<Bigfoot::Log>::Instance().GetLogger(loggerName)) \
|
||||
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().GetLogger(loggerName)) \
|
||||
{ \
|
||||
QUILL_LOG_ERROR(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
QUILL_LOG_ERROR(Bigfoot::Singleton<Bigfoot::Log>::Instance().RegisterLogger(loggerName), \
|
||||
QUILL_LOG_ERROR(::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().RegisterLogger(loggerName), \
|
||||
fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -167,13 +83,13 @@ class Log
|
||||
#define BIGFOOT_LOG_FATAL(loggerName, fmt, ...) \
|
||||
do \
|
||||
{ \
|
||||
if (quill::Logger* logger = Bigfoot::Singleton<Bigfoot::Log>::Instance().GetLogger(loggerName)) \
|
||||
if (::quill::Logger* logger = ::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().GetLogger(loggerName)) \
|
||||
{ \
|
||||
QUILL_LOG_CRITICAL(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
QUILL_LOG_CRITICAL(Bigfoot::Singleton<Bigfoot::Log>::Instance().RegisterLogger(loggerName), \
|
||||
QUILL_LOG_CRITICAL(::Bigfoot::Singleton<::Bigfoot::Log>::GetInstance().RegisterLogger(loggerName), \
|
||||
fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -15,6 +15,7 @@ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
||||
|
||||
#include "EASTL/unique_ptr.h"
|
||||
#include "EASTL/string.h"
|
||||
#include "EASTL/vector.h"
|
||||
|
||||
namespace Bigfoot {
|
||||
namespace Flat {
|
||||
@@ -95,11 +96,8 @@ inline const ::flatbuffers::TypeTable *LogSinkTypeTypeTable() {
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Bigfoot::Flat::LogSinkTypeTypeTable
|
||||
};
|
||||
static const char * const names[] = {
|
||||
"Console"
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_ENUM, 1, type_codes, type_refs, nullptr, nullptr, names
|
||||
::flatbuffers::ST_ENUM, 1, type_codes, type_refs, nullptr, nullptr, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
@@ -116,16 +114,8 @@ inline const ::flatbuffers::TypeTable *LogLevelTypeTable() {
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Bigfoot::Flat::LogLevelTypeTable
|
||||
};
|
||||
static const char * const names[] = {
|
||||
"Debug",
|
||||
"Trace",
|
||||
"Info",
|
||||
"Warn",
|
||||
"Error",
|
||||
"Critical"
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_ENUM, 6, type_codes, type_refs, nullptr, nullptr, names
|
||||
::flatbuffers::ST_ENUM, 6, type_codes, type_refs, nullptr, nullptr, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_@LOGGER_FILENAME_UPPER@_GENERATED_HPP
|
||||
#define BIGFOOT_@LOGGER_FILENAME_UPPER@_GENERATED_HPP
|
||||
#include <System/Log/Log.hpp>
|
||||
#include <Utils/Log/LogMacros.hpp>
|
||||
|
||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* \author Romain BOULLARD
|
||||
* \date October 2025
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_CONCAT_PROFILER_HPP
|
||||
#define BIGFOOT_CONCAT_PROFILER_HPP
|
||||
#ifndef BIGFOOT_UTILS_PROFILER_HPP
|
||||
#define BIGFOOT_UTILS_PROFILER_HPP
|
||||
|
||||
#ifdef TRACY
|
||||
#include <tracy/Tracy.hpp>
|
||||
@@ -6,12 +6,7 @@
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_UTILS_SINGLETON_HPP
|
||||
#define BIGFOOT_UTILS_SINGLETON_HPP
|
||||
|
||||
#include <EASTL/array.h>
|
||||
#include <EASTL/bit.h>
|
||||
#include <EASTL/optional.h>
|
||||
#include <EASTL/type_traits.h>
|
||||
#include <EASTL/utility.h>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
@@ -31,7 +26,7 @@ class Singleton
|
||||
*
|
||||
* \return The instance
|
||||
*/
|
||||
static constexpr TYPE& Instance()
|
||||
static constexpr TYPE& GetInstance()
|
||||
{
|
||||
return ms_instance.value();
|
||||
}
|
||||
@@ -68,15 +63,11 @@ class Singleton
|
||||
Finalize();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
Lifetime& operator=(const Lifetime& p_lifetime) = delete;
|
||||
[[nodiscard]]
|
||||
Lifetime& operator=(Lifetime&& p_lifetime) = delete;
|
||||
Lifetime& operator=(Lifetime&& p_lifetime) noexcept = delete;
|
||||
};
|
||||
|
||||
[[nodiscard]]
|
||||
Singleton& operator=(const Singleton& p_singleton) = delete;
|
||||
[[nodiscard]]
|
||||
Singleton& operator=(Singleton&& p_singleton) = delete;
|
||||
|
||||
private:
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* \author Romain BOULLARD
|
||||
* \date December 2025
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_UTILS_TAGGEDTYPE_H
|
||||
#define BIGFOOT_UTILS_TAGGEDTYPE_H
|
||||
#ifndef BIGFOOT_UTILS_TAGGEDTYPE_HPP
|
||||
#define BIGFOOT_UTILS_TAGGEDTYPE_HPP
|
||||
|
||||
#include <compare>
|
||||
|
||||
|
||||
52
Bigfoot/Sources/Utils/Include/Utils/UtilsAssertHandler.hpp
Normal file
52
Bigfoot/Sources/Utils/Include/Utils/UtilsAssertHandler.hpp
Normal file
@@ -0,0 +1,52 @@
|
||||
/*********************************************************************
|
||||
* \file UtilsAssertHandler.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date May 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_UTILS_UTILSASSERTHANDLER_HPP
|
||||
#define BIGFOOT_UTILS_UTILSASSERTHANDLER_HPP
|
||||
#include <Utils/Assert.hpp>
|
||||
#include <Utils/UtilsLogger_generated.hpp>
|
||||
|
||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||
|
||||
#include <format>
|
||||
#include <source_location>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
class UtilsAssertHandler
|
||||
{
|
||||
public:
|
||||
UtilsAssertHandler() = delete;
|
||||
|
||||
UtilsAssertHandler(const UtilsAssertHandler& p_handler) = delete;
|
||||
UtilsAssertHandler(UtilsAssertHandler&& p_handler) = delete;
|
||||
|
||||
~UtilsAssertHandler() = delete;
|
||||
|
||||
/**
|
||||
* Handle an assertion.
|
||||
*
|
||||
* \param p_location Location of the assertion.
|
||||
* \param p_format Format string for the assertion message.
|
||||
* \param p_args Arguments for the format string.
|
||||
*/
|
||||
template<typename... ARGS>
|
||||
static void Handle(const std::source_location& p_location, std::format_string<ARGS...> p_format, ARGS&&... p_args)
|
||||
{
|
||||
BIGFOOT_LOG_FATAL(UTILS_LOGGER,
|
||||
"Assert: {} (File:{}, Line:{}, Function:{}\n",
|
||||
std::format(p_format, std::forward<ARGS>(p_args)...),
|
||||
p_location.file_name(),
|
||||
p_location.line(),
|
||||
p_location.function_name());
|
||||
}
|
||||
|
||||
UtilsAssertHandler& operator=(const UtilsAssertHandler& p_handler) = delete;
|
||||
UtilsAssertHandler& operator=(UtilsAssertHandler&& p_handler) = delete;
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,12 +1,12 @@
|
||||
// AUTO-GENERATED DO NOT TOUCH
|
||||
|
||||
/*********************************************************************
|
||||
* \file SystemTestsLogger.generated.hpp
|
||||
* \file UtilsLogger.generated.hpp
|
||||
*
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_SYSTEMTESTSLOGGER_GENERATED_HPP
|
||||
#define BIGFOOT_SYSTEMTESTSLOGGER_GENERATED_HPP
|
||||
#include <System/Log/Log.hpp>
|
||||
#ifndef BIGFOOT_UTILSLOGGER_GENERATED_HPP
|
||||
#define BIGFOOT_UTILSLOGGER_GENERATED_HPP
|
||||
#include <Utils/Log/LogMacros.hpp>
|
||||
|
||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Bigfoot
|
||||
/*
|
||||
* Logger
|
||||
*/
|
||||
inline Log::LoggerInfo SYSTEMTESTS_LOGGER {"SYSTEMTESTS_LOGGER", Flat::LogLevel::Trace};
|
||||
inline Log::LoggerInfo UTILS_LOGGER {"UTILS_LOGGER", Flat::LogLevel::Trace};
|
||||
} // namespace Bigfoot
|
||||
#endif
|
||||
#endif
|
||||
@@ -53,7 +53,7 @@ class Version
|
||||
* \return The major part of the version.
|
||||
*/
|
||||
[[nodiscard]]
|
||||
constexpr std::uint8_t Major() const
|
||||
constexpr std::uint8_t GetMajor() const
|
||||
{
|
||||
constexpr std::uint32_t mask = 0b00000000111111110000000000000000;
|
||||
|
||||
@@ -66,7 +66,7 @@ class Version
|
||||
* \return The minor part of the version.
|
||||
*/
|
||||
[[nodiscard]]
|
||||
constexpr std::uint8_t Minor() const
|
||||
constexpr std::uint8_t GetMinor() const
|
||||
{
|
||||
constexpr std::uint32_t mask = 0b00000000000000001111111100000000;
|
||||
|
||||
@@ -79,54 +79,37 @@ class Version
|
||||
* \return The patch part of the version.
|
||||
*/
|
||||
[[nodiscard]]
|
||||
constexpr std::uint8_t Patch() const
|
||||
constexpr std::uint8_t GetPatch() const
|
||||
{
|
||||
constexpr std::uint32_t mask = 0b00000000000000000000000011111111;
|
||||
|
||||
return static_cast<std::uint8_t>(m_combined & mask);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the raw Version
|
||||
*
|
||||
* \return the raw version
|
||||
*/
|
||||
[[nodiscard]]
|
||||
constexpr operator std::uint32_t() const
|
||||
constexpr std::uint32_t Raw() const
|
||||
{
|
||||
return m_combined;
|
||||
}
|
||||
|
||||
operator std::string() const;
|
||||
/**
|
||||
* Gets the string representation of the Version
|
||||
*
|
||||
* \return The string
|
||||
*/
|
||||
[[nodiscard]]
|
||||
std::string ToString() const;
|
||||
|
||||
constexpr Version& operator=(const Version& p_version) = default;
|
||||
|
||||
constexpr Version& operator=(Version&& p_version) = default;
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr bool operator>(const Version& p_version) const
|
||||
{
|
||||
return m_combined > p_version.m_combined;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr bool operator<(const Version& p_version) const
|
||||
{
|
||||
return m_combined < p_version.m_combined;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr bool operator>=(const Version& p_version) const
|
||||
{
|
||||
return m_combined >= p_version.m_combined;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr bool operator<=(const Version& p_version) const
|
||||
{
|
||||
return m_combined <= p_version.m_combined;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr bool operator==(const Version& p_version) const = default;
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr bool operator!=(const Version& p_version) const = default;
|
||||
constexpr auto operator<=>(const Version& p_version) const = default;
|
||||
|
||||
private:
|
||||
/**
|
||||
@@ -151,7 +134,7 @@ struct std::formatter<Bigfoot::Version>
|
||||
template<typename FormatContext>
|
||||
auto format(const Bigfoot::Version& p_version, FormatContext& p_context) const
|
||||
{
|
||||
return std::format_to(p_context.out(), "{}", static_cast<std::string>(p_version));
|
||||
return std::format_to(p_context.out(), "{}", p_version.ToString());
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* \author Romain BOULLARD
|
||||
* \date October 2025
|
||||
*********************************************************************/
|
||||
#include <System/Log/Log.hpp>
|
||||
#include <Utils/Log/Log.hpp>
|
||||
|
||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||
|
||||
@@ -33,6 +33,16 @@ quill::Logger* Log::RegisterLogger(const LoggerInfo& p_loggerInfo)
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
void Log::UnregisterLogger(const LoggerInfo& p_loggerInfo)
|
||||
{
|
||||
if (quill::Logger* logger = quill::Frontend::get_logger(p_loggerInfo.m_name))
|
||||
{
|
||||
quill::Frontend::remove_logger_blocking(logger);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
quill::Logger* Log::GetLogger(const LoggerInfo& p_loggerInfo)
|
||||
{
|
||||
return quill::Frontend::get_logger(p_loggerInfo.m_name);
|
||||
@@ -92,12 +102,10 @@ void Log::Flush()
|
||||
Log::~Log()
|
||||
{
|
||||
Flush();
|
||||
|
||||
for (quill::Logger* logger: quill::Frontend::get_all_loggers())
|
||||
{
|
||||
quill::Frontend::remove_logger(logger);
|
||||
quill::Frontend::remove_logger_blocking(logger);
|
||||
}
|
||||
|
||||
quill::Backend::stop();
|
||||
}
|
||||
} // namespace Bigfoot
|
||||
@@ -4,7 +4,7 @@
|
||||
* \author Romain BOULLARD
|
||||
* \date October 2025
|
||||
*********************************************************************/
|
||||
#include <System/Profiler.hpp>
|
||||
#include <Utils/Profiler.hpp>
|
||||
|
||||
#if defined BIGFOOT_WINDOWS
|
||||
#pragma comment(linker, "/include:mi_version")
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
Version::operator std::string() const
|
||||
std::string Version::ToString() const
|
||||
{
|
||||
return std::format("{}.{}.{}", Major(), Minor(), Patch());
|
||||
return std::format("{}.{}.{}", GetMajor(), GetMinor(), GetPatch());
|
||||
}
|
||||
} // namespace Bigfoot
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/System)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Utils)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/System)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Engine)
|
||||
206
Bigfoot/Tests/Engine/Asset/Asset.cpp
Normal file
206
Bigfoot/Tests/Engine/Asset/Asset.cpp
Normal file
@@ -0,0 +1,206 @@
|
||||
/*********************************************************************
|
||||
* \file BigFile.cpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date December 2025
|
||||
*********************************************************************/
|
||||
#include <Engine/Asset/Asset.hpp>
|
||||
|
||||
#include <EngineTests/Asset/AssetA.hpp>
|
||||
#include <EngineTests/Asset/AssetB.hpp>
|
||||
#include <EngineTests/Asset/AssetC.hpp>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
class AssetFixture: public ::testing::Test
|
||||
{
|
||||
protected:
|
||||
};
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
TEST_F(AssetFixture, AssetATests)
|
||||
{
|
||||
constexpr eastl::string_view name = "Hello";
|
||||
constexpr std::uint32_t version = 42;
|
||||
constexpr std::uint32_t health = 100;
|
||||
constexpr std::uint32_t mana = 50;
|
||||
|
||||
AssetA assetA;
|
||||
assetA.SetName(name);
|
||||
assetA.SetVersion(version);
|
||||
assetA.GetAsset().health = health;
|
||||
assetA.GetAsset().mana = mana;
|
||||
|
||||
const eastl::vector<std::byte> test = assetA.Save();
|
||||
|
||||
AssetA assetA_dup {test};
|
||||
|
||||
EXPECT_EQ(assetA.GetHeader().uuid, assetA_dup.GetHeader().uuid);
|
||||
|
||||
EXPECT_EQ(assetA.GetHeader().type_id, AssetA::GetTypeID());
|
||||
EXPECT_EQ(assetA.GetHeader().type_id, assetA_dup.GetHeader().type_id);
|
||||
|
||||
EXPECT_EQ(assetA.GetHeader().type_name, AssetA::GetTypeName());
|
||||
EXPECT_EQ(assetA.GetHeader().type_name, assetA_dup.GetHeader().type_name);
|
||||
|
||||
EXPECT_EQ(assetA.GetHeader().name, name);
|
||||
EXPECT_EQ(assetA.GetHeader().name, assetA_dup.GetHeader().name);
|
||||
|
||||
EXPECT_EQ(assetA.GetHeader().version, version);
|
||||
EXPECT_EQ(assetA.GetHeader().version, assetA_dup.GetHeader().version);
|
||||
|
||||
EXPECT_EQ(assetA.GetAsset().health, health);
|
||||
EXPECT_EQ(assetA.GetAsset().health, assetA_dup.GetAsset().health);
|
||||
|
||||
EXPECT_EQ(assetA.GetAsset().mana, mana);
|
||||
EXPECT_EQ(assetA.GetAsset().mana, assetA_dup.GetAsset().mana);
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
TEST_F(AssetFixture, AssetBTests)
|
||||
{
|
||||
constexpr eastl::string_view nameA = "Hello";
|
||||
constexpr std::uint32_t versionA = 42;
|
||||
constexpr std::uint32_t healthA = 100;
|
||||
constexpr std::uint32_t manaA = 50;
|
||||
|
||||
AssetA assetA;
|
||||
assetA.SetName(nameA);
|
||||
assetA.SetVersion(versionA);
|
||||
assetA.GetAsset().health = healthA;
|
||||
assetA.GetAsset().mana = manaA;
|
||||
|
||||
constexpr eastl::string_view nameAA = "There";
|
||||
constexpr std::uint32_t versionAA = 42;
|
||||
constexpr std::uint32_t healthAA = 100;
|
||||
constexpr std::uint32_t manaAA = 50;
|
||||
|
||||
AssetA assetAA;
|
||||
assetAA.SetName(nameAA);
|
||||
assetAA.SetVersion(versionAA);
|
||||
assetAA.GetAsset().health = healthAA;
|
||||
assetAA.GetAsset().mana = manaAA;
|
||||
|
||||
constexpr eastl::string_view nameB = "Kenobi";
|
||||
constexpr std::uint32_t versionB = 1;
|
||||
|
||||
AssetB assetB;
|
||||
assetB.SetName(nameB);
|
||||
assetB.SetVersion(versionB);
|
||||
assetB.GetAsset().asset_a_ref = HardReference<AssetA> {assetA.GetHeader().uuid};
|
||||
assetB.GetAsset().asset_a_refs = {SoftReference<AssetA> {assetA.GetHeader().uuid},
|
||||
SoftReference<AssetA> {assetAA.GetHeader().uuid}};
|
||||
|
||||
const eastl::vector<std::byte> test = assetB.Save();
|
||||
|
||||
AssetB assetB_dup {test};
|
||||
|
||||
EXPECT_EQ(assetB.GetHeader().uuid, assetB_dup.GetHeader().uuid);
|
||||
|
||||
EXPECT_EQ(assetB.GetHeader().type_id, AssetB::GetTypeID());
|
||||
EXPECT_EQ(assetB.GetHeader().type_id, assetB_dup.GetHeader().type_id);
|
||||
|
||||
EXPECT_EQ(assetB.GetHeader().type_name, AssetB::GetTypeName());
|
||||
EXPECT_EQ(assetB.GetHeader().type_name, assetB_dup.GetHeader().type_name);
|
||||
|
||||
EXPECT_EQ(assetB.GetHeader().name, nameB);
|
||||
EXPECT_EQ(assetB.GetHeader().name, assetB_dup.GetHeader().name);
|
||||
|
||||
EXPECT_EQ(assetB.GetHeader().version, versionB);
|
||||
EXPECT_EQ(assetB.GetHeader().version, assetB_dup.GetHeader().version);
|
||||
|
||||
EXPECT_EQ(assetB.GetAsset().asset_a_ref, HardReference<AssetA> {assetA.GetHeader().uuid});
|
||||
EXPECT_EQ(assetB.GetAsset().asset_a_ref, assetB_dup.GetAsset().asset_a_ref);
|
||||
|
||||
EXPECT_EQ(assetB.GetAsset().asset_a_refs,
|
||||
(eastl::vector<SoftReference<AssetA>> {SoftReference<AssetA> {assetA.GetHeader().uuid},
|
||||
SoftReference<AssetA> {assetAA.GetHeader().uuid}}));
|
||||
EXPECT_EQ(assetB.GetAsset().asset_a_refs, assetB_dup.GetAsset().asset_a_refs);
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
TEST_F(AssetFixture, AssetCTests)
|
||||
{
|
||||
constexpr eastl::string_view nameA = "Hello";
|
||||
constexpr std::uint32_t versionA = 42;
|
||||
constexpr std::uint32_t healthA = 100;
|
||||
constexpr std::uint32_t manaA = 50;
|
||||
|
||||
AssetA assetA;
|
||||
assetA.SetName(nameA);
|
||||
assetA.SetVersion(versionA);
|
||||
assetA.GetAsset().health = healthA;
|
||||
assetA.GetAsset().mana = manaA;
|
||||
|
||||
constexpr eastl::string_view nameAA = "There";
|
||||
constexpr std::uint32_t versionAA = 42;
|
||||
constexpr std::uint32_t healthAA = 100;
|
||||
constexpr std::uint32_t manaAA = 50;
|
||||
|
||||
AssetA assetAA;
|
||||
assetAA.SetName(nameAA);
|
||||
assetAA.SetVersion(versionAA);
|
||||
assetAA.GetAsset().health = healthAA;
|
||||
assetAA.GetAsset().mana = manaAA;
|
||||
|
||||
constexpr eastl::string_view nameB = "Kenobi";
|
||||
constexpr std::uint32_t versionB = 1;
|
||||
|
||||
AssetB assetB;
|
||||
assetB.SetName(nameB);
|
||||
assetB.SetVersion(versionB);
|
||||
assetB.GetAsset().asset_a_ref = HardReference<AssetA> {assetA.GetHeader().uuid};
|
||||
assetB.GetAsset().asset_a_refs = {SoftReference<AssetA> {assetA.GetHeader().uuid},
|
||||
SoftReference<AssetA> {assetAA.GetHeader().uuid}};
|
||||
|
||||
constexpr eastl::string_view nameC = "General";
|
||||
constexpr std::uint32_t versionC = 1;
|
||||
|
||||
AssetC assetC;
|
||||
assetC.SetName(nameC);
|
||||
assetC.SetVersion(versionC);
|
||||
assetC.GetAsset().inner_table->asset_a_ref = HardReference<AssetA> {assetA.GetHeader().uuid};
|
||||
assetC.GetAsset().inner_table->asset_a_refs = {HardReference<AssetA> {assetA.GetHeader().uuid},
|
||||
HardReference<AssetA> {assetAA.GetHeader().uuid}};
|
||||
assetC.GetAsset().asset_b_ref = HardReference<AssetB> {assetB.GetHeader().uuid};
|
||||
assetC.GetAsset().asset_b_refs = {SoftReference<AssetB> {assetB.GetHeader().uuid}};
|
||||
|
||||
const eastl::vector<std::byte> test = assetC.Save();
|
||||
|
||||
AssetC assetC_dup {test};
|
||||
|
||||
EXPECT_EQ(assetC.GetHeader().uuid, assetC_dup.GetHeader().uuid);
|
||||
|
||||
EXPECT_EQ(assetC.GetHeader().type_id, AssetC::GetTypeID());
|
||||
EXPECT_EQ(assetC.GetHeader().type_id, assetC_dup.GetHeader().type_id);
|
||||
|
||||
EXPECT_EQ(assetC.GetHeader().type_name, AssetC::GetTypeName());
|
||||
EXPECT_EQ(assetC.GetHeader().type_name, assetC_dup.GetHeader().type_name);
|
||||
|
||||
EXPECT_EQ(assetC.GetHeader().name, nameC);
|
||||
EXPECT_EQ(assetC.GetHeader().name, assetC_dup.GetHeader().name);
|
||||
|
||||
EXPECT_EQ(assetC.GetHeader().version, versionC);
|
||||
EXPECT_EQ(assetC.GetHeader().version, assetC_dup.GetHeader().version);
|
||||
|
||||
EXPECT_EQ(assetC.GetAsset().asset_b_ref, HardReference<AssetB> {assetB.GetHeader().uuid});
|
||||
EXPECT_EQ(assetC.GetAsset().asset_b_ref, assetC_dup.GetAsset().asset_b_ref);
|
||||
|
||||
EXPECT_EQ(assetC.GetAsset().asset_b_refs,
|
||||
(eastl::vector<SoftReference<AssetB>> {SoftReference<AssetB> {assetB.GetHeader().uuid}}));
|
||||
EXPECT_EQ(assetC.GetAsset().asset_b_refs, assetC_dup.GetAsset().asset_b_refs);
|
||||
|
||||
EXPECT_EQ(assetC.GetAsset().inner_table->asset_a_ref, HardReference<AssetA> {assetA.GetHeader().uuid});
|
||||
EXPECT_EQ(assetC.GetAsset().inner_table->asset_a_ref, assetC_dup.GetAsset().inner_table->asset_a_ref);
|
||||
|
||||
EXPECT_EQ(assetC.GetAsset().inner_table->asset_a_refs,
|
||||
(eastl::vector<HardReference<AssetA>> {HardReference<AssetA> {assetA.GetHeader().uuid},
|
||||
HardReference<AssetA> {assetAA.GetHeader().uuid}}));
|
||||
EXPECT_EQ(assetC.GetAsset().inner_table->asset_a_refs, assetC_dup.GetAsset().inner_table->asset_a_refs);
|
||||
}
|
||||
} // namespace Bigfoot
|
||||
73
Bigfoot/Tests/Engine/Asset/AssetContainer.cpp
Normal file
73
Bigfoot/Tests/Engine/Asset/AssetContainer.cpp
Normal file
@@ -0,0 +1,73 @@
|
||||
/*********************************************************************
|
||||
* \file BigFile.cpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date December 2025
|
||||
*********************************************************************/
|
||||
#include <Engine/Asset/AssetContainer.hpp>
|
||||
|
||||
#include <EngineTests/Asset/AssetA.hpp>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
class AssetContainerFixture: public ::testing::Test
|
||||
{
|
||||
protected:
|
||||
AssetContainer<AssetA> m_container;
|
||||
};
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
TEST_F(AssetContainerFixture, Insert)
|
||||
{
|
||||
std::ignore = m_container.Insert();
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
TEST_F(AssetContainerFixture, Get)
|
||||
{
|
||||
const auto key = m_container.Insert();
|
||||
|
||||
const auto& constContainer = m_container;
|
||||
|
||||
const auto validateKey = [&](auto& p_assetContainer)
|
||||
{
|
||||
const auto asset = p_assetContainer.Get(key);
|
||||
EXPECT_NE(asset, nullptr);
|
||||
};
|
||||
validateKey(m_container);
|
||||
validateKey(constContainer);
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
TEST_F(AssetContainerFixture, GetSlotKey)
|
||||
{
|
||||
const auto key = m_container.Insert();
|
||||
const auto asset = m_container.Get(key);
|
||||
EXPECT_EQ(m_container.GetSlotKey(asset->GetHeader().uuid), key);
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
TEST_F(AssetContainerFixture, Has)
|
||||
{
|
||||
const auto key = m_container.Insert();
|
||||
EXPECT_TRUE(m_container.Has(key));
|
||||
EXPECT_TRUE(m_container.Has(m_container.Get(key)->GetHeader().uuid));
|
||||
}
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
TEST_F(AssetContainerFixture, Remove)
|
||||
{
|
||||
const auto key1 = m_container.Insert();
|
||||
m_container.Remove(key1);
|
||||
|
||||
const auto key2 = m_container.Insert();
|
||||
m_container.Remove(m_container.Get(key2)->GetHeader().uuid);
|
||||
}
|
||||
} // namespace Bigfoot
|
||||
@@ -6,21 +6,13 @@
|
||||
*********************************************************************/
|
||||
#include <Engine/BigFile/BigFile.hpp>
|
||||
|
||||
#include <Engine/BigFile/Asset/Asset.hpp>
|
||||
|
||||
#include <System/Log/Log.hpp>
|
||||
#include <System/Time/Time.hpp>
|
||||
#include <System/UUID/UUID.hpp>
|
||||
|
||||
#include <Utils/Singleton.hpp>
|
||||
#include <Utils/TargetMacros.h>
|
||||
|
||||
#include <EngineTests/BigFile/Asset/AssetA.bfbs_generated.hpp>
|
||||
#include <EngineTests/BigFile/Asset/AssetA.hpp>
|
||||
#include <EngineTests/BigFileInfo_generated.hpp>
|
||||
|
||||
#include <ankerl/unordered_dense.h>
|
||||
#include <flatbuffers/reflection.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace Bigfoot
|
||||
@@ -32,149 +24,83 @@ class BigFileFixture: public ::testing::Test
|
||||
{
|
||||
BigFile::Request deleteHeader {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();
|
||||
deleteAsset.Execute();
|
||||
deleteDependencies.Execute();
|
||||
m_bigFile.CommitTransaction();
|
||||
|
||||
std::ignore = Singleton<Log>::Instance().RegisterLogger(ENGINE_LOGGER);
|
||||
}
|
||||
|
||||
AssetAContainer m_assetAContainer;
|
||||
|
||||
BIGFOOT_NOT_OPTIMIZED_ONLY(Singleton<Log>::Lifetime m_loggerLifetime;)
|
||||
|
||||
BigFile m_bigFile {File {BIGFILE_ENGINETESTS_LOCATION}};
|
||||
};
|
||||
|
||||
/****************************************************************************************/
|
||||
|
||||
TEST_F(BigFileFixture, Lol)
|
||||
TEST_F(BigFileFixture, BigFileManipulation)
|
||||
{
|
||||
{
|
||||
EXPECT_STREQ(FlatAssetWrapper<Flat::AssetA>::TypeName().data(), "Bigfoot.Flat.AssetA");
|
||||
EXPECT_EQ(FlatAssetWrapper<Flat::AssetA>::TypeID(),
|
||||
rapidhash(FlatAssetWrapper<Flat::AssetA>::TypeName().data(),
|
||||
FlatAssetWrapper<Flat::AssetA>::TypeName().size()));
|
||||
|
||||
UUID uuid;
|
||||
std::ignore = m_assetAContainer.Add(uuid);
|
||||
|
||||
FlatAssetWrapper<Flat::AssetA> test {};
|
||||
test.Asset().asset_header->name = "Instance";
|
||||
test.Asset().asset_header->uuid = uuid;
|
||||
|
||||
const eastl::vector<std::byte> flatBuffer = test.Pack();
|
||||
|
||||
std::ignore = m_assetAContainer.Load(uuid, flatBuffer);
|
||||
m_assetAContainer.UnloadUnreferenced();
|
||||
|
||||
// UUID uuid;
|
||||
// std::ignore = m_assetAContainer.Add(uuid, "Instance");
|
||||
|
||||
// AssetA* test = m_assetAContainer.Get(uuid);
|
||||
|
||||
// test->Health() = 100;
|
||||
// test->Mana() = 42;
|
||||
|
||||
// const eastl::vector<std::byte> flatbuffer = m_assetAContainer.Pack(uuid);
|
||||
// m_assetAContainer.Remove(uuid);
|
||||
|
||||
// std::ignore = m_assetAContainer.Add(uuid, flatbuffer);
|
||||
// std::ignore = m_assetAContainer.Add(UUID {}, "Instance2");
|
||||
// std::ignore = m_assetAContainer.Add(UUID {}, "Instance3");
|
||||
|
||||
// AssetA* test2 = m_assetAContainer.Get(uuid);
|
||||
|
||||
// EXPECT_EQ(test2->Health(), 100);
|
||||
// EXPECT_EQ(test2->Mana(), 42);
|
||||
|
||||
// EXPECT_STREQ(test2->AssetHeader()->name.c_str(), "Instance");
|
||||
// EXPECT_EQ(test2->AssetHeader()->type_id, FlatAssetWrapper<Flat::AssetA>::TypeID());
|
||||
// EXPECT_STREQ(test2->AssetHeader()->type_name.c_str(), FlatAssetWrapper<Flat::AssetA>::TypeName().data());
|
||||
// EXPECT_EQ(test2->AssetHeader()->uuid, uuid);
|
||||
// EXPECT_EQ(test2->AssetHeader()->version, 2);
|
||||
}
|
||||
|
||||
UUID uuid;
|
||||
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> 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> blob4 {std::byte {10}, std::byte {11}, std::byte {12}, std::byte {13}};
|
||||
constexpr eastl::array<std::byte, 4> blob {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {4}};
|
||||
constexpr eastl::array<std::byte, 4> blob2 {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {5}};
|
||||
constexpr eastl::array<std::byte, 4> blob3 {std::byte {1}, std::byte {2}, std::byte {3}, std::byte {6}};
|
||||
constexpr eastl::array<std::byte, 4> blob4 {std::byte {10}, std::byte {11}, std::byte {12}, std::byte {13}};
|
||||
|
||||
constexpr std::uint64_t typeIDRef = std::numeric_limits<std::uint64_t>::max() - 1;
|
||||
|
||||
{
|
||||
BigFile::Request assetHeaderRequest {
|
||||
m_bigFile,
|
||||
"INSERT INTO AssetHeader (UUID, Name, TypeID, TypeName) VALUES(?, ?, ?, ?)"};
|
||||
assetHeaderRequest.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
||||
assetHeaderRequest.Bind(1, uuid.ToBytes());
|
||||
assetHeaderRequest.Bind(2, "Test");
|
||||
assetHeaderRequest.Bind(3, 42);
|
||||
assetHeaderRequest.Bind(3, typeIDRef);
|
||||
assetHeaderRequest.Bind(4, "TypeTest");
|
||||
|
||||
BigFile::Request assetRequest {m_bigFile, "INSERT INTO Asset (UUID, Asset) VALUES(?, ?)"};
|
||||
assetRequest.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
||||
assetRequest.Bind(1, uuid.ToBytes());
|
||||
assetRequest.Bind(2, blob);
|
||||
|
||||
BigFile::Request assetHeaderRequest2 {
|
||||
m_bigFile,
|
||||
"INSERT INTO AssetHeader (UUID, Name, TypeID, TypeName) VALUES(?, ?, ?, ?)"};
|
||||
assetHeaderRequest2.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid2));
|
||||
assetHeaderRequest2.Bind(1, uuid2.ToBytes());
|
||||
assetHeaderRequest2.Bind(2, "Test2");
|
||||
assetHeaderRequest2.Bind(3, 42);
|
||||
assetHeaderRequest2.Bind(3, typeIDRef);
|
||||
assetHeaderRequest2.Bind(4, "TypeTest");
|
||||
|
||||
BigFile::Request assetRequest2 {m_bigFile, "INSERT INTO Asset (UUID, Asset) VALUES(?, ?)"};
|
||||
assetRequest2.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid2));
|
||||
assetRequest2.Bind(1, uuid2.ToBytes());
|
||||
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(1, uuid3.ToBytes());
|
||||
assetHeaderRequest3.Bind(2, "Test3");
|
||||
assetHeaderRequest3.Bind(3, 42);
|
||||
assetHeaderRequest3.Bind(3, typeIDRef);
|
||||
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(1, uuid3.ToBytes());
|
||||
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();
|
||||
[[maybe_unused]]
|
||||
std::uint32_t assetHeaderChangedCount = assetHeaderRequest.Execute();
|
||||
[[maybe_unused]]
|
||||
EXPECT_EQ(assetHeaderChangedCount, 1);
|
||||
std::uint32_t assetChangedCount = assetRequest.Execute();
|
||||
EXPECT_EQ(assetChangedCount, 1);
|
||||
|
||||
[[maybe_unused]]
|
||||
std::uint32_t assetHeaderChangedCount2 = assetHeaderRequest2.Execute();
|
||||
[[maybe_unused]]
|
||||
EXPECT_EQ(assetHeaderChangedCount2, 1);
|
||||
std::uint32_t assetChangedCount2 = assetRequest2.Execute();
|
||||
EXPECT_EQ(assetChangedCount2, 1);
|
||||
|
||||
[[maybe_unused]]
|
||||
std::uint32_t assetHeaderChangedCount3 = assetHeaderRequest3.Execute();
|
||||
[[maybe_unused]]
|
||||
EXPECT_EQ(assetHeaderChangedCount3, 1);
|
||||
std::uint32_t assetChangedCount3 = assetRequest3.Execute();
|
||||
|
||||
[[maybe_unused]]
|
||||
std::uint32_t assetDependencyChangedCount = assetDependency.Execute();
|
||||
[[maybe_unused]]
|
||||
std::uint32_t assetDependencyChangedCount2 = assetDependency2.Execute();
|
||||
EXPECT_EQ(assetChangedCount3, 1);
|
||||
|
||||
m_bigFile.CommitTransaction();
|
||||
}
|
||||
@@ -182,11 +108,11 @@ TEST_F(BigFileFixture, Lol)
|
||||
{
|
||||
BigFile::Request updateAsset {m_bigFile, "UPDATE Asset SET Asset = ? WHERE UUID = ?"};
|
||||
updateAsset.Bind(1, blob2);
|
||||
updateAsset.Bind(2, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
||||
updateAsset.Bind(2, uuid.ToBytes());
|
||||
|
||||
m_bigFile.BeginTransaction();
|
||||
[[maybe_unused]]
|
||||
std::uint32_t updateAssetChangedCount = updateAsset.Execute();
|
||||
EXPECT_EQ(updateAssetChangedCount, 1);
|
||||
m_bigFile.CommitTransaction();
|
||||
}
|
||||
|
||||
@@ -194,137 +120,28 @@ TEST_F(BigFileFixture, Lol)
|
||||
BigFile::Request request {
|
||||
m_bigFile,
|
||||
"SELECT Name, TypeID, TypeName, CreateTime, ModificationTime FROM AssetHeader WHERE UUID = ?"};
|
||||
request.Bind(1, static_cast<std::span<const std::byte, UUID::UUID_BYTE_SIZE>>(uuid));
|
||||
request.Bind(1, uuid.ToBytes());
|
||||
|
||||
[[maybe_unused]]
|
||||
const bool get = request.Step();
|
||||
EXPECT_TRUE(get);
|
||||
|
||||
[[maybe_unused]]
|
||||
const eastl::string name {static_cast<eastl::string_view>(request.Get(0))};
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t typeId = request.Get(1);
|
||||
[[maybe_unused]]
|
||||
EXPECT_STREQ(name.c_str(), "Test");
|
||||
const std::uint64_t typeID = static_cast<std::uint64_t>(request.Get(1));
|
||||
EXPECT_EQ(typeID, typeIDRef);
|
||||
const eastl::string typeName {static_cast<eastl::string_view>(request.Get(2))};
|
||||
[[maybe_unused]]
|
||||
const Time createTime = static_cast<std::int64_t>(request.Get(3));
|
||||
[[maybe_unused]]
|
||||
const Time modificationTime = static_cast<std::int64_t>(request.Get(4));
|
||||
EXPECT_STREQ(typeName.c_str(), "TypeTest");
|
||||
|
||||
{
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t year = createTime.Year();
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t month = createTime.Month();
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t day = createTime.Day();
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t hour = createTime.Hour();
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t minute = createTime.Minute();
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t second = createTime.Second();
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t microsecond = createTime.Microsecond();
|
||||
}
|
||||
const Time createTime = static_cast<std::uint64_t>(request.Get(3));
|
||||
const Time modificationTime = static_cast<std::uint64_t>(request.Get(4));
|
||||
|
||||
{
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t year = modificationTime.Year();
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t month = modificationTime.Month();
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t day = modificationTime.Day();
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t hour = modificationTime.Hour();
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t minute = modificationTime.Minute();
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t second = modificationTime.Second();
|
||||
[[maybe_unused]]
|
||||
const std::uint32_t microsecond = modificationTime.Microsecond();
|
||||
}
|
||||
}
|
||||
EXPECT_GT(createTime.GetEpoch(), 0);
|
||||
EXPECT_GT(modificationTime.GetEpoch(), 0);
|
||||
|
||||
{
|
||||
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));
|
||||
EXPECT_GE(createTime, modificationTime);
|
||||
|
||||
ankerl::unordered_dense::segmented_set<UUID> dependencies;
|
||||
|
||||
[[maybe_unused]]
|
||||
const bool get = getDependency.Step();
|
||||
|
||||
auto test = static_cast<eastl::span<const std::byte>>(getDependency.Get(0));
|
||||
dependencies.insert(UUID {std::span<const std::byte, UUID::UUID_BYTE_SIZE> {test.begin(), test.end()}});
|
||||
|
||||
[[maybe_unused]]
|
||||
const bool get2 = getDependency.Step();
|
||||
|
||||
auto test2 = static_cast<eastl::span<const std::byte>>(getDependency.Get(0));
|
||||
dependencies.insert(UUID {std::span<const std::byte, UUID::UUID_BYTE_SIZE> {test2.begin(), test2.end()}});
|
||||
|
||||
EXPECT_TRUE(dependencies.find(uuid3) != dependencies.end());
|
||||
EXPECT_TRUE(dependencies.find(uuid2) != dependencies.end());
|
||||
}
|
||||
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(BigFileFixture, Reflection)
|
||||
{
|
||||
[[maybe_unused]]
|
||||
const reflection::Schema* reflection = reflection::GetSchema(g_AssetA_bfbs.data());
|
||||
|
||||
auto IsRef = [](const reflection::Object* obj) -> bool
|
||||
{
|
||||
if (!obj->attributes())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for (const auto attr: *obj->attributes())
|
||||
{
|
||||
if (std::strcmp(attr->key()->c_str(), "isRef") == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
for (const auto test: *reflection->root_table()->fields())
|
||||
{
|
||||
std::string typeName;
|
||||
bool isRef = false;
|
||||
|
||||
if (test->type()->base_type() == reflection::BaseType::Obj)
|
||||
{
|
||||
const reflection::Object* obj = reflection->objects()->Get(test->type()->index());
|
||||
typeName = obj->name()->c_str();
|
||||
isRef = IsRef(obj);
|
||||
}
|
||||
else if (test->type()->base_type() == reflection::BaseType::Vector &&
|
||||
test->type()->element() == reflection::BaseType::Obj)
|
||||
{
|
||||
const reflection::Object* obj = reflection->objects()->Get(test->type()->index());
|
||||
typeName = std::string("[") + obj->name()->c_str() + "]";
|
||||
isRef = IsRef(obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
typeName = reflection::EnumNameBaseType(test->type()->base_type());
|
||||
}
|
||||
|
||||
BIGFOOT_LOG_INFO(ENGINE_LOGGER, "{} {} {}", typeName, test->name()->c_str(), isRef ? "(isRef)" : "");
|
||||
EXPECT_GT(createTime.GetYear(), 2025);
|
||||
EXPECT_GT(modificationTime.GetYear(), 2025);
|
||||
}
|
||||
}
|
||||
} // namespace Bigfoot
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
project(${PackageName}Tests)
|
||||
|
||||
set(BigfootDependencies
|
||||
Engine
|
||||
System
|
||||
Utils)
|
||||
|
||||
bigfoot_create_bigfile("Tests/Bigfoot")
|
||||
|
||||
bigfoot_create_package_tests(
|
||||
""
|
||||
"${BigfootDependencies}")
|
||||
"")
|
||||
|
||||
bigfoot_create_bigfile("Tests/Bigfoot")
|
||||
9
Bigfoot/Tests/Engine/EngineTests/Asset/AssetA_fwd.cpp
Normal file
9
Bigfoot/Tests/Engine/EngineTests/Asset/AssetA_fwd.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
/*********************************************************************
|
||||
* \file AssetA_fwd.cpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date May 2026
|
||||
*********************************************************************/
|
||||
#include <EngineTests/Asset/AssetA_fwd.hpp>
|
||||
|
||||
ASSET_REF_IMPL(AssetA, ::Bigfoot::AssetA)
|
||||
9
Bigfoot/Tests/Engine/EngineTests/Asset/AssetB_fwd.cpp
Normal file
9
Bigfoot/Tests/Engine/EngineTests/Asset/AssetB_fwd.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
/*********************************************************************
|
||||
* \file AssetB_fwd.cpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date May 2026
|
||||
*********************************************************************/
|
||||
#include <EngineTests/Asset/AssetB_fwd.hpp>
|
||||
|
||||
ASSET_REF_IMPL(AssetB, ::Bigfoot::AssetB)
|
||||
9
Bigfoot/Tests/Engine/EngineTests/Asset/AssetC_fwd.cpp
Normal file
9
Bigfoot/Tests/Engine/EngineTests/Asset/AssetC_fwd.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
/*********************************************************************
|
||||
* \file AssetC_fwd.cpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date May 2026
|
||||
*********************************************************************/
|
||||
#include <EngineTests/Asset/AssetC_fwd.hpp>
|
||||
|
||||
ASSET_REF_IMPL(AssetC, ::Bigfoot::AssetC)
|
||||
19
Bigfoot/Tests/Engine/EngineTests/main.cpp
Normal file
19
Bigfoot/Tests/Engine/EngineTests/main.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
/*********************************************************************
|
||||
* \file main.cpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date May 2026
|
||||
*********************************************************************/
|
||||
#include <Utils/Log/LogMacros.hpp>
|
||||
#include <Utils/TargetMacros.h>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
|
||||
BIGFOOT_NOT_OPTIMIZED_ONLY(::Bigfoot::Singleton<::Bigfoot::Log>::Lifetime m_lifetime);
|
||||
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
13
Bigfoot/Tests/Engine/Include/EngineTests/Asset/AssetA.fbs
Normal file
13
Bigfoot/Tests/Engine/Include/EngineTests/Asset/AssetA.fbs
Normal file
@@ -0,0 +1,13 @@
|
||||
include "Engine/Asset/Reference.fbs";
|
||||
|
||||
native_include "EngineTests/Asset/AssetA_fwd.hpp";
|
||||
|
||||
namespace Flat.Bigfoot;
|
||||
|
||||
table AssetA
|
||||
{
|
||||
health: uint = 0;
|
||||
mana: uint = 0;
|
||||
}
|
||||
|
||||
root_type AssetA;
|
||||
40
Bigfoot/Tests/Engine/Include/EngineTests/Asset/AssetA.hpp
Normal file
40
Bigfoot/Tests/Engine/Include/EngineTests/Asset/AssetA.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
/*********************************************************************
|
||||
* \file AssetA.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date April 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINETESTS_ASSET_ASSETA_HPP
|
||||
#define BIGFOOT_ENGINETESTS_ASSET_ASSETA_HPP
|
||||
#include <Engine/Asset/Asset.hpp>
|
||||
|
||||
#include <EngineTests/Asset/AssetA_generated.hpp>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
struct AssetATraits
|
||||
{
|
||||
using FLAT = ::Flat::Bigfoot::AssetA;
|
||||
};
|
||||
|
||||
class AssetA: public Asset<AssetATraits>
|
||||
{
|
||||
public:
|
||||
AssetA() = default;
|
||||
|
||||
AssetA(const eastl::span<const std::byte> p_flatbuffer):
|
||||
Asset(p_flatbuffer)
|
||||
{
|
||||
}
|
||||
|
||||
AssetA(const AssetA& p_asset) = delete;
|
||||
AssetA(AssetA&& p_asset) = default;
|
||||
|
||||
~AssetA() = default;
|
||||
|
||||
AssetA& operator=(const AssetA& p_asset) = delete;
|
||||
AssetA& operator=(AssetA&& p_asset) = default;
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
/*********************************************************************
|
||||
* \file AssetA_fwd.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date May 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINETESTS_ASSET_ASSETA_FWD_HPP
|
||||
#define BIGFOOT_ENGINETESTS_ASSET_ASSETA_FWD_HPP
|
||||
#include <Engine/Asset/AssetHelper.hpp>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
class AssetA;
|
||||
} // namespace Bigfoot
|
||||
|
||||
ASSET_DECL(AssetA, ::Bigfoot::AssetA)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,205 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_ASSETA_FLAT_BIGFOOT_H_
|
||||
#define FLATBUFFERS_GENERATED_ASSETA_FLAT_BIGFOOT_H_
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
// Ensure the included flatbuffers.h is the same version as when this file was
|
||||
// generated, otherwise it may not be compatible.
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 12 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 19,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "Engine/Asset/Reference.hpp"
|
||||
#include "System/UUID/UUID.hpp"
|
||||
#include "Engine/Asset/Reference.hpp"
|
||||
#include "EngineTests/Asset/AssetA_fwd.hpp"
|
||||
#include "Engine/Asset/Reference_generated.hpp"
|
||||
|
||||
#include "EASTL/unique_ptr.h"
|
||||
#include "EASTL/string.h"
|
||||
#include "EASTL/vector.h"
|
||||
|
||||
namespace Flat {
|
||||
namespace Bigfoot {
|
||||
|
||||
struct AssetA;
|
||||
struct AssetABuilder;
|
||||
struct AssetAT;
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetATypeTable();
|
||||
|
||||
struct AssetAT : public ::flatbuffers::NativeTable {
|
||||
typedef AssetA TableType;
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.AssetAT";
|
||||
}
|
||||
uint32_t health = 0;
|
||||
uint32_t mana = 0;
|
||||
};
|
||||
|
||||
struct AssetA FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef AssetAT NativeTableType;
|
||||
typedef AssetABuilder Builder;
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AssetATypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.AssetA";
|
||||
}
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_HEALTH = 4,
|
||||
VT_MANA = 6
|
||||
};
|
||||
uint32_t health() const {
|
||||
return GetField<uint32_t>(VT_HEALTH, 0);
|
||||
}
|
||||
uint32_t mana() const {
|
||||
return GetField<uint32_t>(VT_MANA, 0);
|
||||
}
|
||||
template <bool B = false>
|
||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyField<uint32_t>(verifier, VT_HEALTH, 4) &&
|
||||
VerifyField<uint32_t>(verifier, VT_MANA, 4) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
AssetAT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
void UnPackTo(AssetAT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
static ::flatbuffers::Offset<AssetA> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
};
|
||||
|
||||
struct AssetABuilder {
|
||||
typedef AssetA Table;
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_health(uint32_t health) {
|
||||
fbb_.AddElement<uint32_t>(AssetA::VT_HEALTH, health, 0);
|
||||
}
|
||||
void add_mana(uint32_t mana) {
|
||||
fbb_.AddElement<uint32_t>(AssetA::VT_MANA, mana, 0);
|
||||
}
|
||||
explicit AssetABuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
::flatbuffers::Offset<AssetA> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<AssetA>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<AssetA> CreateAssetA(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
uint32_t health = 0,
|
||||
uint32_t mana = 0) {
|
||||
AssetABuilder builder_(_fbb);
|
||||
builder_.add_mana(mana);
|
||||
builder_.add_health(health);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct AssetA::Traits {
|
||||
using type = AssetA;
|
||||
static auto constexpr Create = CreateAssetA;
|
||||
};
|
||||
|
||||
::flatbuffers::Offset<AssetA> CreateAssetA(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
inline AssetAT *AssetA::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
auto _o = std::make_unique<AssetAT>();
|
||||
UnPackTo(_o.get(), _resolver);
|
||||
return _o.release();
|
||||
}
|
||||
|
||||
inline void AssetA::UnPackTo(AssetAT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
(void)_o;
|
||||
(void)_resolver;
|
||||
{ auto _e = health(); _o->health = _e; }
|
||||
{ auto _e = mana(); _o->mana = _e; }
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetA> CreateAssetA(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
return AssetA::Pack(_fbb, _o, _rehasher);
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetA> AssetA::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
(void)_rehasher;
|
||||
(void)_o;
|
||||
struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetAT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
|
||||
auto _health = _o->health;
|
||||
auto _mana = _o->mana;
|
||||
return Flat::Bigfoot::CreateAssetA(
|
||||
_fbb,
|
||||
_health,
|
||||
_mana);
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetATypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_UINT, 0, -1 },
|
||||
{ ::flatbuffers::ET_UINT, 0, -1 }
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const Flat::Bigfoot::AssetA *GetAssetA(const void *buf) {
|
||||
return ::flatbuffers::GetRoot<Flat::Bigfoot::AssetA>(buf);
|
||||
}
|
||||
|
||||
inline const Flat::Bigfoot::AssetA *GetSizePrefixedAssetA(const void *buf) {
|
||||
return ::flatbuffers::GetSizePrefixedRoot<Flat::Bigfoot::AssetA>(buf);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifyAssetABuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifyBuffer<Flat::Bigfoot::AssetA>(nullptr);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifySizePrefixedAssetABuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifySizePrefixedBuffer<Flat::Bigfoot::AssetA>(nullptr);
|
||||
}
|
||||
|
||||
inline const char *AssetAExtension() {
|
||||
return "bfbs";
|
||||
}
|
||||
|
||||
inline void FinishAssetABuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Flat::Bigfoot::AssetA> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedAssetABuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Flat::Bigfoot::AssetA> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Flat::Bigfoot::AssetAT> UnPackAssetA(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Flat::Bigfoot::AssetAT>(GetAssetA(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Flat::Bigfoot::AssetAT> UnPackSizePrefixedAssetA(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Flat::Bigfoot::AssetAT>(GetSizePrefixedAssetA(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
} // namespace Bigfoot
|
||||
} // namespace Flat
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_ASSETA_FLAT_BIGFOOT_H_
|
||||
15
Bigfoot/Tests/Engine/Include/EngineTests/Asset/AssetB.fbs
Normal file
15
Bigfoot/Tests/Engine/Include/EngineTests/Asset/AssetB.fbs
Normal file
@@ -0,0 +1,15 @@
|
||||
include "Engine/Asset/Reference.fbs";
|
||||
|
||||
include "EngineTests/Asset/AssetA.fbs";
|
||||
|
||||
native_include "EngineTests/Asset/AssetB_fwd.hpp";
|
||||
|
||||
namespace Flat.Bigfoot;
|
||||
|
||||
table AssetB
|
||||
{
|
||||
asset_a_ref: Flat.Bigfoot.HardReference (native_type: "::Bigfoot::HardReference<::Bigfoot::AssetA>", native_inline, native_type_pack_name: "HardReferenceAssetA");
|
||||
asset_a_refs: [Flat.Bigfoot.SoftReference] (native_type: "::Bigfoot::SoftReference<::Bigfoot::AssetA>", native_inline, native_type_pack_name: "SoftReferenceAssetA");
|
||||
}
|
||||
|
||||
root_type AssetB;
|
||||
40
Bigfoot/Tests/Engine/Include/EngineTests/Asset/AssetB.hpp
Normal file
40
Bigfoot/Tests/Engine/Include/EngineTests/Asset/AssetB.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
/*********************************************************************
|
||||
* \file AssetB.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date April 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINETESTS_ASSET_ASSETB_HPP
|
||||
#define BIGFOOT_ENGINETESTS_ASSET_ASSETB_HPP
|
||||
#include <Engine/Asset/Asset.hpp>
|
||||
|
||||
#include <EngineTests/Asset/AssetB_generated.hpp>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
struct AssetBTraits
|
||||
{
|
||||
using FLAT = ::Flat::Bigfoot::AssetB;
|
||||
};
|
||||
|
||||
class AssetB: public Asset<AssetBTraits>
|
||||
{
|
||||
public:
|
||||
AssetB() = default;
|
||||
|
||||
AssetB(const eastl::span<const std::byte> p_flatbuffer):
|
||||
Asset(p_flatbuffer)
|
||||
{
|
||||
}
|
||||
|
||||
AssetB(const AssetB& p_asset) = delete;
|
||||
AssetB(AssetB&& p_asset) = default;
|
||||
|
||||
~AssetB() = default;
|
||||
|
||||
AssetB& operator=(const AssetB& p_asset) = delete;
|
||||
AssetB& operator=(AssetB&& p_asset) = default;
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
/*********************************************************************
|
||||
* \file AssetB_fwd.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date May 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINETESTS_ASSET_ASSETB_FWD_HPP
|
||||
#define BIGFOOT_ENGINETESTS_ASSET_ASSETB_FWD_HPP
|
||||
#include <Engine/Asset/AssetHelper.hpp>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
class AssetB;
|
||||
} // namespace Bigfoot
|
||||
|
||||
ASSET_DECL(AssetB, ::Bigfoot::AssetB)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,212 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_ASSETB_FLAT_BIGFOOT_H_
|
||||
#define FLATBUFFERS_GENERATED_ASSETB_FLAT_BIGFOOT_H_
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
// Ensure the included flatbuffers.h is the same version as when this file was
|
||||
// generated, otherwise it may not be compatible.
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 12 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 19,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "Engine/Asset/Reference.hpp"
|
||||
#include "System/UUID/UUID.hpp"
|
||||
#include "Engine/Asset/Reference.hpp"
|
||||
#include "EngineTests/Asset/AssetA_fwd.hpp"
|
||||
#include "EngineTests/Asset/AssetB_fwd.hpp"
|
||||
#include "Engine/Asset/Reference_generated.hpp"
|
||||
#include "EngineTests/Asset/AssetA_generated.hpp"
|
||||
|
||||
#include "EASTL/unique_ptr.h"
|
||||
#include "EASTL/string.h"
|
||||
#include "EASTL/vector.h"
|
||||
|
||||
namespace Flat {
|
||||
namespace Bigfoot {
|
||||
|
||||
struct AssetB;
|
||||
struct AssetBBuilder;
|
||||
struct AssetBT;
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetBTypeTable();
|
||||
|
||||
struct AssetBT : public ::flatbuffers::NativeTable {
|
||||
typedef AssetB TableType;
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.AssetBT";
|
||||
}
|
||||
::Bigfoot::HardReference<::Bigfoot::AssetA> asset_a_ref{};
|
||||
eastl::vector<::Bigfoot::SoftReference<::Bigfoot::AssetA>> asset_a_refs{};
|
||||
};
|
||||
|
||||
struct AssetB FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef AssetBT NativeTableType;
|
||||
typedef AssetBBuilder Builder;
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AssetBTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.AssetB";
|
||||
}
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_ASSET_A_REF = 4,
|
||||
VT_ASSET_A_REFS = 6
|
||||
};
|
||||
const Flat::Bigfoot::HardReference *asset_a_ref() const {
|
||||
return GetStruct<const Flat::Bigfoot::HardReference *>(VT_ASSET_A_REF);
|
||||
}
|
||||
const ::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *> *asset_a_refs() const {
|
||||
return GetPointer<const ::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *> *>(VT_ASSET_A_REFS);
|
||||
}
|
||||
template <bool B = false>
|
||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyField<Flat::Bigfoot::HardReference>(verifier, VT_ASSET_A_REF, 1) &&
|
||||
VerifyOffset(verifier, VT_ASSET_A_REFS) &&
|
||||
verifier.VerifyVector(asset_a_refs()) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
AssetBT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
void UnPackTo(AssetBT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
static ::flatbuffers::Offset<AssetB> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
};
|
||||
|
||||
struct AssetBBuilder {
|
||||
typedef AssetB Table;
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_asset_a_ref(const Flat::Bigfoot::HardReference *asset_a_ref) {
|
||||
fbb_.AddStruct(AssetB::VT_ASSET_A_REF, asset_a_ref);
|
||||
}
|
||||
void add_asset_a_refs(::flatbuffers::Offset<::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *>> asset_a_refs) {
|
||||
fbb_.AddOffset(AssetB::VT_ASSET_A_REFS, asset_a_refs);
|
||||
}
|
||||
explicit AssetBBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
::flatbuffers::Offset<AssetB> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<AssetB>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<AssetB> CreateAssetB(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const Flat::Bigfoot::HardReference *asset_a_ref = nullptr,
|
||||
::flatbuffers::Offset<::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *>> asset_a_refs = 0) {
|
||||
AssetBBuilder builder_(_fbb);
|
||||
builder_.add_asset_a_refs(asset_a_refs);
|
||||
builder_.add_asset_a_ref(asset_a_ref);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct AssetB::Traits {
|
||||
using type = AssetB;
|
||||
static auto constexpr Create = CreateAssetB;
|
||||
};
|
||||
|
||||
::flatbuffers::Offset<AssetB> CreateAssetB(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
inline AssetBT *AssetB::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
auto _o = std::make_unique<AssetBT>();
|
||||
UnPackTo(_o.get(), _resolver);
|
||||
return _o.release();
|
||||
}
|
||||
|
||||
inline void AssetB::UnPackTo(AssetBT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
(void)_o;
|
||||
(void)_resolver;
|
||||
{ auto _e = asset_a_ref(); if (_e) _o->asset_a_ref = ::flatbuffers::UnPackHardReferenceAssetA(*_e); }
|
||||
{ auto _e = asset_a_refs(); if (_e) { _o->asset_a_refs.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->asset_a_refs[_i] = ::flatbuffers::UnPackSoftReferenceAssetA(*_e->Get(_i)); } } else { _o->asset_a_refs.resize(0); } }
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetB> CreateAssetB(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
return AssetB::Pack(_fbb, _o, _rehasher);
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetB> AssetB::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
(void)_rehasher;
|
||||
(void)_o;
|
||||
struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetBT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
|
||||
auto _asset_a_ref = ::flatbuffers::PackHardReferenceAssetA(_o->asset_a_ref);
|
||||
auto _asset_a_refs = _fbb.CreateVectorOfNativeStructs<Flat::Bigfoot::SoftReference, ::Bigfoot::SoftReference<::Bigfoot::AssetA>>(_o->asset_a_refs.data(), _o->asset_a_refs.size(), ::flatbuffers::PackSoftReferenceAssetA);
|
||||
return Flat::Bigfoot::CreateAssetB(
|
||||
_fbb,
|
||||
&_asset_a_ref,
|
||||
_asset_a_refs);
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetBTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
||||
{ ::flatbuffers::ET_SEQUENCE, 1, 1 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Flat::Bigfoot::HardReferenceTypeTable,
|
||||
Flat::Bigfoot::SoftReferenceTypeTable
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const Flat::Bigfoot::AssetB *GetAssetB(const void *buf) {
|
||||
return ::flatbuffers::GetRoot<Flat::Bigfoot::AssetB>(buf);
|
||||
}
|
||||
|
||||
inline const Flat::Bigfoot::AssetB *GetSizePrefixedAssetB(const void *buf) {
|
||||
return ::flatbuffers::GetSizePrefixedRoot<Flat::Bigfoot::AssetB>(buf);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifyAssetBBuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifyBuffer<Flat::Bigfoot::AssetB>(nullptr);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifySizePrefixedAssetBBuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifySizePrefixedBuffer<Flat::Bigfoot::AssetB>(nullptr);
|
||||
}
|
||||
|
||||
inline const char *AssetBExtension() {
|
||||
return "bfbs";
|
||||
}
|
||||
|
||||
inline void FinishAssetBBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Flat::Bigfoot::AssetB> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedAssetBBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Flat::Bigfoot::AssetB> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Flat::Bigfoot::AssetBT> UnPackAssetB(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Flat::Bigfoot::AssetBT>(GetAssetB(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Flat::Bigfoot::AssetBT> UnPackSizePrefixedAssetB(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Flat::Bigfoot::AssetBT>(GetSizePrefixedAssetB(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
} // namespace Bigfoot
|
||||
} // namespace Flat
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_ASSETB_FLAT_BIGFOOT_H_
|
||||
24
Bigfoot/Tests/Engine/Include/EngineTests/Asset/AssetC.fbs
Normal file
24
Bigfoot/Tests/Engine/Include/EngineTests/Asset/AssetC.fbs
Normal file
@@ -0,0 +1,24 @@
|
||||
include "Engine/Asset/Reference.fbs";
|
||||
|
||||
include "EngineTests/Asset/AssetA.fbs";
|
||||
include "EngineTests/Asset/AssetB.fbs";
|
||||
|
||||
native_include "EngineTests/Asset/AssetC_fwd.hpp";
|
||||
|
||||
namespace Flat.Bigfoot;
|
||||
|
||||
table InnerTable
|
||||
{
|
||||
asset_a_ref: Flat.Bigfoot.HardReference (native_type: "::Bigfoot::HardReference<::Bigfoot::AssetA>", native_inline, native_type_pack_name: "HardReferenceAssetA");
|
||||
asset_a_refs: [Flat.Bigfoot.HardReference] (native_type: "::Bigfoot::HardReference<::Bigfoot::AssetA>", native_inline, native_type_pack_name: "HardReferenceAssetA");
|
||||
}
|
||||
|
||||
table AssetC
|
||||
{
|
||||
inner_table: InnerTable (required);
|
||||
|
||||
asset_b_ref: Flat.Bigfoot.HardReference (native_type: "::Bigfoot::HardReference<::Bigfoot::AssetB>", native_inline, native_type_pack_name: "HardReferenceAssetB");
|
||||
asset_b_refs: [Flat.Bigfoot.SoftReference] (native_type: "::Bigfoot::SoftReference<::Bigfoot::AssetB>", native_inline, native_type_pack_name: "SoftReferenceAssetB");
|
||||
}
|
||||
|
||||
root_type AssetC;
|
||||
43
Bigfoot/Tests/Engine/Include/EngineTests/Asset/AssetC.hpp
Normal file
43
Bigfoot/Tests/Engine/Include/EngineTests/Asset/AssetC.hpp
Normal file
@@ -0,0 +1,43 @@
|
||||
/*********************************************************************
|
||||
* \file AssetC.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date April 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINETESTS_ASSET_ASSETC_HPP
|
||||
#define BIGFOOT_ENGINETESTS_ASSET_ASSETC_HPP
|
||||
#include <Engine/Asset/Asset.hpp>
|
||||
|
||||
#include <EngineTests/Asset/AssetC_generated.hpp>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
struct AssetCTraits
|
||||
{
|
||||
using FLAT = ::Flat::Bigfoot::AssetC;
|
||||
};
|
||||
|
||||
class AssetC: public Asset<AssetCTraits>
|
||||
{
|
||||
public:
|
||||
AssetC()
|
||||
{
|
||||
GetAsset().inner_table = eastl::make_unique<::Flat::Bigfoot::InnerTableT>();
|
||||
}
|
||||
|
||||
AssetC(const eastl::span<const std::byte> p_flatbuffer):
|
||||
Asset(p_flatbuffer)
|
||||
{
|
||||
}
|
||||
|
||||
AssetC(const AssetC& p_asset) = delete;
|
||||
AssetC(AssetC&& p_asset) = default;
|
||||
|
||||
~AssetC() = default;
|
||||
|
||||
AssetC& operator=(const AssetC& p_asset) = delete;
|
||||
AssetC& operator=(AssetC&& p_asset) = default;
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
/*********************************************************************
|
||||
* \file AssetC_fwd.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date May 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINETESTS_ASSET_ASSETC_FWD_HPP
|
||||
#define BIGFOOT_ENGINETESTS_ASSET_ASSETC_FWD_HPP
|
||||
#include <Engine/Asset/AssetHelper.hpp>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
class AssetC;
|
||||
} // namespace Bigfoot
|
||||
|
||||
ASSET_DECL(AssetC, ::Bigfoot::AssetC)
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,378 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_ASSETC_FLAT_BIGFOOT_H_
|
||||
#define FLATBUFFERS_GENERATED_ASSETC_FLAT_BIGFOOT_H_
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
// Ensure the included flatbuffers.h is the same version as when this file was
|
||||
// generated, otherwise it may not be compatible.
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 12 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 19,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "Engine/Asset/Reference.hpp"
|
||||
#include "System/UUID/UUID.hpp"
|
||||
#include "Engine/Asset/Reference.hpp"
|
||||
#include "EngineTests/Asset/AssetA_fwd.hpp"
|
||||
#include "EngineTests/Asset/AssetB_fwd.hpp"
|
||||
#include "EngineTests/Asset/AssetC_fwd.hpp"
|
||||
#include "Engine/Asset/Reference_generated.hpp"
|
||||
#include "EngineTests/Asset/AssetA_generated.hpp"
|
||||
#include "EngineTests/Asset/AssetB_generated.hpp"
|
||||
|
||||
#include "EASTL/unique_ptr.h"
|
||||
#include "EASTL/string.h"
|
||||
#include "EASTL/vector.h"
|
||||
|
||||
namespace Flat {
|
||||
namespace Bigfoot {
|
||||
|
||||
struct InnerTable;
|
||||
struct InnerTableBuilder;
|
||||
struct InnerTableT;
|
||||
|
||||
struct AssetC;
|
||||
struct AssetCBuilder;
|
||||
struct AssetCT;
|
||||
|
||||
inline const ::flatbuffers::TypeTable *InnerTableTypeTable();
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetCTypeTable();
|
||||
|
||||
struct InnerTableT : public ::flatbuffers::NativeTable {
|
||||
typedef InnerTable TableType;
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.InnerTableT";
|
||||
}
|
||||
::Bigfoot::HardReference<::Bigfoot::AssetA> asset_a_ref{};
|
||||
eastl::vector<::Bigfoot::HardReference<::Bigfoot::AssetA>> asset_a_refs{};
|
||||
};
|
||||
|
||||
struct InnerTable FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef InnerTableT NativeTableType;
|
||||
typedef InnerTableBuilder Builder;
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return InnerTableTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.InnerTable";
|
||||
}
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_ASSET_A_REF = 4,
|
||||
VT_ASSET_A_REFS = 6
|
||||
};
|
||||
const Flat::Bigfoot::HardReference *asset_a_ref() const {
|
||||
return GetStruct<const Flat::Bigfoot::HardReference *>(VT_ASSET_A_REF);
|
||||
}
|
||||
const ::flatbuffers::Vector<const Flat::Bigfoot::HardReference *> *asset_a_refs() const {
|
||||
return GetPointer<const ::flatbuffers::Vector<const Flat::Bigfoot::HardReference *> *>(VT_ASSET_A_REFS);
|
||||
}
|
||||
template <bool B = false>
|
||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyField<Flat::Bigfoot::HardReference>(verifier, VT_ASSET_A_REF, 1) &&
|
||||
VerifyOffset(verifier, VT_ASSET_A_REFS) &&
|
||||
verifier.VerifyVector(asset_a_refs()) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
InnerTableT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
void UnPackTo(InnerTableT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
static ::flatbuffers::Offset<InnerTable> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const InnerTableT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
};
|
||||
|
||||
struct InnerTableBuilder {
|
||||
typedef InnerTable Table;
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_asset_a_ref(const Flat::Bigfoot::HardReference *asset_a_ref) {
|
||||
fbb_.AddStruct(InnerTable::VT_ASSET_A_REF, asset_a_ref);
|
||||
}
|
||||
void add_asset_a_refs(::flatbuffers::Offset<::flatbuffers::Vector<const Flat::Bigfoot::HardReference *>> asset_a_refs) {
|
||||
fbb_.AddOffset(InnerTable::VT_ASSET_A_REFS, asset_a_refs);
|
||||
}
|
||||
explicit InnerTableBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
::flatbuffers::Offset<InnerTable> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<InnerTable>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<InnerTable> CreateInnerTable(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const Flat::Bigfoot::HardReference *asset_a_ref = nullptr,
|
||||
::flatbuffers::Offset<::flatbuffers::Vector<const Flat::Bigfoot::HardReference *>> asset_a_refs = 0) {
|
||||
InnerTableBuilder builder_(_fbb);
|
||||
builder_.add_asset_a_refs(asset_a_refs);
|
||||
builder_.add_asset_a_ref(asset_a_ref);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct InnerTable::Traits {
|
||||
using type = InnerTable;
|
||||
static auto constexpr Create = CreateInnerTable;
|
||||
};
|
||||
|
||||
::flatbuffers::Offset<InnerTable> CreateInnerTable(::flatbuffers::FlatBufferBuilder &_fbb, const InnerTableT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
struct AssetCT : public ::flatbuffers::NativeTable {
|
||||
typedef AssetC TableType;
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.AssetCT";
|
||||
}
|
||||
eastl::unique_ptr<Flat::Bigfoot::InnerTableT> inner_table{};
|
||||
::Bigfoot::HardReference<::Bigfoot::AssetB> asset_b_ref{};
|
||||
eastl::vector<::Bigfoot::SoftReference<::Bigfoot::AssetB>> asset_b_refs{};
|
||||
AssetCT() = default;
|
||||
AssetCT(const AssetCT &o);
|
||||
AssetCT(AssetCT&&) FLATBUFFERS_NOEXCEPT = default;
|
||||
AssetCT &operator=(AssetCT o) FLATBUFFERS_NOEXCEPT;
|
||||
};
|
||||
|
||||
struct AssetC FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef AssetCT NativeTableType;
|
||||
typedef AssetCBuilder Builder;
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AssetCTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Flat.Bigfoot.AssetC";
|
||||
}
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_INNER_TABLE = 4,
|
||||
VT_ASSET_B_REF = 6,
|
||||
VT_ASSET_B_REFS = 8
|
||||
};
|
||||
const Flat::Bigfoot::InnerTable *inner_table() const {
|
||||
return GetPointer<const Flat::Bigfoot::InnerTable *>(VT_INNER_TABLE);
|
||||
}
|
||||
const Flat::Bigfoot::HardReference *asset_b_ref() const {
|
||||
return GetStruct<const Flat::Bigfoot::HardReference *>(VT_ASSET_B_REF);
|
||||
}
|
||||
const ::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *> *asset_b_refs() const {
|
||||
return GetPointer<const ::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *> *>(VT_ASSET_B_REFS);
|
||||
}
|
||||
template <bool B = false>
|
||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffsetRequired(verifier, VT_INNER_TABLE) &&
|
||||
verifier.VerifyTable(inner_table()) &&
|
||||
VerifyField<Flat::Bigfoot::HardReference>(verifier, VT_ASSET_B_REF, 1) &&
|
||||
VerifyOffset(verifier, VT_ASSET_B_REFS) &&
|
||||
verifier.VerifyVector(asset_b_refs()) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
AssetCT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
void UnPackTo(AssetCT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
static ::flatbuffers::Offset<AssetC> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetCT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
};
|
||||
|
||||
struct AssetCBuilder {
|
||||
typedef AssetC Table;
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_inner_table(::flatbuffers::Offset<Flat::Bigfoot::InnerTable> inner_table) {
|
||||
fbb_.AddOffset(AssetC::VT_INNER_TABLE, inner_table);
|
||||
}
|
||||
void add_asset_b_ref(const Flat::Bigfoot::HardReference *asset_b_ref) {
|
||||
fbb_.AddStruct(AssetC::VT_ASSET_B_REF, asset_b_ref);
|
||||
}
|
||||
void add_asset_b_refs(::flatbuffers::Offset<::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *>> asset_b_refs) {
|
||||
fbb_.AddOffset(AssetC::VT_ASSET_B_REFS, asset_b_refs);
|
||||
}
|
||||
explicit AssetCBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
::flatbuffers::Offset<AssetC> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<AssetC>(end);
|
||||
fbb_.Required(o, AssetC::VT_INNER_TABLE);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<AssetC> CreateAssetC(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<Flat::Bigfoot::InnerTable> inner_table = 0,
|
||||
const Flat::Bigfoot::HardReference *asset_b_ref = nullptr,
|
||||
::flatbuffers::Offset<::flatbuffers::Vector<const Flat::Bigfoot::SoftReference *>> asset_b_refs = 0) {
|
||||
AssetCBuilder builder_(_fbb);
|
||||
builder_.add_asset_b_refs(asset_b_refs);
|
||||
builder_.add_asset_b_ref(asset_b_ref);
|
||||
builder_.add_inner_table(inner_table);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct AssetC::Traits {
|
||||
using type = AssetC;
|
||||
static auto constexpr Create = CreateAssetC;
|
||||
};
|
||||
|
||||
::flatbuffers::Offset<AssetC> CreateAssetC(::flatbuffers::FlatBufferBuilder &_fbb, const AssetCT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
inline InnerTableT *InnerTable::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
auto _o = std::make_unique<InnerTableT>();
|
||||
UnPackTo(_o.get(), _resolver);
|
||||
return _o.release();
|
||||
}
|
||||
|
||||
inline void InnerTable::UnPackTo(InnerTableT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
(void)_o;
|
||||
(void)_resolver;
|
||||
{ auto _e = asset_a_ref(); if (_e) _o->asset_a_ref = ::flatbuffers::UnPackHardReferenceAssetA(*_e); }
|
||||
{ auto _e = asset_a_refs(); if (_e) { _o->asset_a_refs.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->asset_a_refs[_i] = ::flatbuffers::UnPackHardReferenceAssetA(*_e->Get(_i)); } } else { _o->asset_a_refs.resize(0); } }
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<InnerTable> CreateInnerTable(::flatbuffers::FlatBufferBuilder &_fbb, const InnerTableT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
return InnerTable::Pack(_fbb, _o, _rehasher);
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<InnerTable> InnerTable::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const InnerTableT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
(void)_rehasher;
|
||||
(void)_o;
|
||||
struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const InnerTableT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
|
||||
auto _asset_a_ref = ::flatbuffers::PackHardReferenceAssetA(_o->asset_a_ref);
|
||||
auto _asset_a_refs = _fbb.CreateVectorOfNativeStructs<Flat::Bigfoot::HardReference, ::Bigfoot::HardReference<::Bigfoot::AssetA>>(_o->asset_a_refs.data(), _o->asset_a_refs.size(), ::flatbuffers::PackHardReferenceAssetA);
|
||||
return Flat::Bigfoot::CreateInnerTable(
|
||||
_fbb,
|
||||
&_asset_a_ref,
|
||||
_asset_a_refs);
|
||||
}
|
||||
|
||||
inline AssetCT::AssetCT(const AssetCT &o)
|
||||
: inner_table((o.inner_table) ? new Flat::Bigfoot::InnerTableT(*o.inner_table) : nullptr),
|
||||
asset_b_ref(o.asset_b_ref),
|
||||
asset_b_refs(o.asset_b_refs) {
|
||||
}
|
||||
|
||||
inline AssetCT &AssetCT::operator=(AssetCT o) FLATBUFFERS_NOEXCEPT {
|
||||
std::swap(inner_table, o.inner_table);
|
||||
std::swap(asset_b_ref, o.asset_b_ref);
|
||||
std::swap(asset_b_refs, o.asset_b_refs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline AssetCT *AssetC::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
auto _o = std::make_unique<AssetCT>();
|
||||
UnPackTo(_o.get(), _resolver);
|
||||
return _o.release();
|
||||
}
|
||||
|
||||
inline void AssetC::UnPackTo(AssetCT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
(void)_o;
|
||||
(void)_resolver;
|
||||
{ auto _e = inner_table(); if (_e) { if(_o->inner_table) { _e->UnPackTo(_o->inner_table.get(), _resolver); } else { _o->inner_table = eastl::unique_ptr<Flat::Bigfoot::InnerTableT>(_e->UnPack(_resolver)); } } else if (_o->inner_table) { _o->inner_table.reset(); } }
|
||||
{ auto _e = asset_b_ref(); if (_e) _o->asset_b_ref = ::flatbuffers::UnPackHardReferenceAssetB(*_e); }
|
||||
{ auto _e = asset_b_refs(); if (_e) { _o->asset_b_refs.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->asset_b_refs[_i] = ::flatbuffers::UnPackSoftReferenceAssetB(*_e->Get(_i)); } } else { _o->asset_b_refs.resize(0); } }
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetC> CreateAssetC(::flatbuffers::FlatBufferBuilder &_fbb, const AssetCT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
return AssetC::Pack(_fbb, _o, _rehasher);
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetC> AssetC::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetCT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
(void)_rehasher;
|
||||
(void)_o;
|
||||
struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetCT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
|
||||
auto _inner_table = _o->inner_table ? CreateInnerTable(_fbb, _o->inner_table.get(), _rehasher) : 0;
|
||||
auto _asset_b_ref = ::flatbuffers::PackHardReferenceAssetB(_o->asset_b_ref);
|
||||
auto _asset_b_refs = _fbb.CreateVectorOfNativeStructs<Flat::Bigfoot::SoftReference, ::Bigfoot::SoftReference<::Bigfoot::AssetB>>(_o->asset_b_refs.data(), _o->asset_b_refs.size(), ::flatbuffers::PackSoftReferenceAssetB);
|
||||
return Flat::Bigfoot::CreateAssetC(
|
||||
_fbb,
|
||||
_inner_table,
|
||||
&_asset_b_ref,
|
||||
_asset_b_refs);
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *InnerTableTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
||||
{ ::flatbuffers::ET_SEQUENCE, 1, 0 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Flat::Bigfoot::HardReferenceTypeTable
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetCTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 1 },
|
||||
{ ::flatbuffers::ET_SEQUENCE, 1, 2 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Flat::Bigfoot::InnerTableTypeTable,
|
||||
Flat::Bigfoot::HardReferenceTypeTable,
|
||||
Flat::Bigfoot::SoftReferenceTypeTable
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, nullptr
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const Flat::Bigfoot::AssetC *GetAssetC(const void *buf) {
|
||||
return ::flatbuffers::GetRoot<Flat::Bigfoot::AssetC>(buf);
|
||||
}
|
||||
|
||||
inline const Flat::Bigfoot::AssetC *GetSizePrefixedAssetC(const void *buf) {
|
||||
return ::flatbuffers::GetSizePrefixedRoot<Flat::Bigfoot::AssetC>(buf);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifyAssetCBuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifyBuffer<Flat::Bigfoot::AssetC>(nullptr);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifySizePrefixedAssetCBuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifySizePrefixedBuffer<Flat::Bigfoot::AssetC>(nullptr);
|
||||
}
|
||||
|
||||
inline const char *AssetCExtension() {
|
||||
return "bfbs";
|
||||
}
|
||||
|
||||
inline void FinishAssetCBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Flat::Bigfoot::AssetC> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedAssetCBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Flat::Bigfoot::AssetC> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Flat::Bigfoot::AssetCT> UnPackAssetC(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Flat::Bigfoot::AssetCT>(GetAssetC(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Flat::Bigfoot::AssetCT> UnPackSizePrefixedAssetC(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Flat::Bigfoot::AssetCT>(GetSizePrefixedAssetC(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
} // namespace Bigfoot
|
||||
} // namespace Flat
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_ASSETC_FLAT_BIGFOOT_H_
|
||||
Binary file not shown.
@@ -1,124 +0,0 @@
|
||||
/**
|
||||
* Auto-generated header from: AssetA.bfbs
|
||||
* Generated by Bin2CPP
|
||||
*
|
||||
* DO NOT TOUCH
|
||||
*/
|
||||
#ifndef ASSETA_BFBS_HPP
|
||||
#define ASSETA_BFBS_HPP
|
||||
#include <EASTL/array.h>
|
||||
#include <cstddef>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
inline constexpr eastl::array<std::byte, 1672> g_AssetA_bfbs = {
|
||||
std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x42}, std::byte{0x46}, std::byte{0x42}, std::byte{0x53}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x2C}, std::byte{0x00},
|
||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x38}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xA8}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x40}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x74}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xA8}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x40}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0xE8}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x70}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x44}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x48}, std::byte{0xFA}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xE8}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x88}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x5C}, std::byte{0xFA}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x5C}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x6C}, std::byte{0xFA}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x14}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x7C}, std::byte{0xFA}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x60}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xF8}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2C}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0xDC}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x90}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0xD8}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xAC}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x20}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x64}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x13}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x41}, std::byte{0x00},
|
||||
std::byte{0xD4}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x78}, std::byte{0xFC}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0F}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x72}, std::byte{0x65}, std::byte{0x66}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01},
|
||||
std::byte{0x03}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00},
|
||||
std::byte{0x06}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x0E}, std::byte{0x0F}, std::byte{0x03}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x72}, std::byte{0x65}, std::byte{0x66}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xF4}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x02}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x48}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x6D}, std::byte{0x61}, std::byte{0x6E}, std::byte{0x61}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x1C}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x01}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x70}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x68}, std::byte{0x65}, std::byte{0x61}, std::byte{0x6C}, std::byte{0x74}, std::byte{0x68}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x04}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x68}, std::byte{0xFD}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0F}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x20}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00},
|
||||
std::byte{0x07}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x5C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x50}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x2F}, 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{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x50}, std::byte{0xFC}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x69}, std::byte{0x73}, std::byte{0x52}, std::byte{0x65}, std::byte{0x66}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x52}, std::byte{0x65}, std::byte{0x66}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x90}, std::byte{0xFC}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0xFE}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0F}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x75}, std::byte{0x75}, std::byte{0x69}, std::byte{0x64}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x7C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x60}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x4F}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E},
|
||||
std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F},
|
||||
std::byte{0x53}, std::byte{0x6F}, std::byte{0x75}, std::byte{0x72}, std::byte{0x63}, std::byte{0x65}, std::byte{0x73}, std::byte{0x2F}, std::byte{0x45}, std::byte{0x6E}, std::byte{0x67}, std::byte{0x69}, std::byte{0x6E}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x49},
|
||||
std::byte{0x6E}, std::byte{0x63}, std::byte{0x6C}, std::byte{0x75}, std::byte{0x64}, std::byte{0x65}, std::byte{0x2F}, 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{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0xDC}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x94}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x60}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x30}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, 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{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00},
|
||||
std::byte{0x0C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x60}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x76}, std::byte{0x65}, std::byte{0x72}, std::byte{0x73}, std::byte{0x69}, std::byte{0x6F}, std::byte{0x6E}, std::byte{0x00}, std::byte{0xA0}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01},
|
||||
std::byte{0x03}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x8C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0D}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x09}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65},
|
||||
std::byte{0x5F}, std::byte{0x6E}, std::byte{0x61}, std::byte{0x6D}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0xD0}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01},
|
||||
std::byte{0x02}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x70}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0F}, std::byte{0x02}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x74}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x5F}, std::byte{0x69}, std::byte{0x64}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x01}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x10}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00},
|
||||
std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0D}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x6E}, std::byte{0x61}, std::byte{0x6D}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x01}, std::byte{0x04}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00},
|
||||
std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0F}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x75}, std::byte{0x75}, std::byte{0x69}, std::byte{0x64}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x4C}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01},
|
||||
std::byte{0x60}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x54}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x3F}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2F}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F},
|
||||
std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x53}, std::byte{0x6F}, std::byte{0x75}, std::byte{0x72},
|
||||
std::byte{0x63}, std::byte{0x65}, std::byte{0x73}, std::byte{0x2F}, std::byte{0x53}, std::byte{0x79}, std::byte{0x73}, std::byte{0x74}, std::byte{0x65}, std::byte{0x6D}, std::byte{0x2F}, std::byte{0x49}, std::byte{0x6E}, std::byte{0x63}, std::byte{0x6C}, std::byte{0x75},
|
||||
std::byte{0x64}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x53}, std::byte{0x79}, std::byte{0x73}, std::byte{0x74}, std::byte{0x65}, std::byte{0x6D}, std::byte{0x2F}, std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x2F}, std::byte{0x55},
|
||||
std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x11}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x55}, std::byte{0x55}, std::byte{0x49}, std::byte{0x44}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x20}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0xFF}, std::byte{0x24}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x06}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x11}, std::byte{0x04}, std::byte{0x10}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x62}, std::byte{0x79}, std::byte{0x74}, std::byte{0x65}, std::byte{0x73}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x1C}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x07}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00},
|
||||
std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x70}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x64}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x4F}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x2F}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E},
|
||||
std::byte{0x2F}, std::byte{0x2E}, std::byte{0x2E}, std::byte{0x2F}, std::byte{0x53}, std::byte{0x6F}, std::byte{0x75}, std::byte{0x72}, std::byte{0x63}, std::byte{0x65}, std::byte{0x73}, std::byte{0x2F}, std::byte{0x45}, std::byte{0x6E}, std::byte{0x67}, std::byte{0x69},
|
||||
std::byte{0x6E}, std::byte{0x65}, std::byte{0x2F}, std::byte{0x49}, std::byte{0x6E}, std::byte{0x63}, std::byte{0x6C}, std::byte{0x75}, std::byte{0x64}, std::byte{0x65}, std::byte{0x2F}, 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{0x54}, std::byte{0x79}, std::byte{0x70}, std::byte{0x65}, std::byte{0x49}, std::byte{0x44}, std::byte{0x2E}, std::byte{0x66}, std::byte{0x62}, std::byte{0x73}, std::byte{0x00},
|
||||
std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x2C}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x18}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, 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{0x2E}, std::byte{0x41}, std::byte{0x73}, std::byte{0x73}, std::byte{0x65}, std::byte{0x74}, std::byte{0x54}, std::byte{0x79},
|
||||
std::byte{0x70}, std::byte{0x65}, std::byte{0x49}, std::byte{0x44}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x04}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00},
|
||||
std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x28}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x14}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00},
|
||||
std::byte{0x07}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x08}, std::byte{0x00}, std::byte{0x0C}, std::byte{0x00}, std::byte{0x10}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x0A}, std::byte{0x08}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x01}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}, std::byte{0x05}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00},
|
||||
std::byte{0x76}, std::byte{0x61}, std::byte{0x6C}, std::byte{0x75}, std::byte{0x65}, std::byte{0x00}, std::byte{0x00}, std::byte{0x00}
|
||||
};
|
||||
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif // ASSETA_BFBS_HPP
|
||||
@@ -1,23 +0,0 @@
|
||||
include "Engine/BigFile/Asset/AssetHeader.fbs";
|
||||
|
||||
namespace Bigfoot.Flat;
|
||||
|
||||
attribute "isRef";
|
||||
|
||||
struct Ref (isRef)
|
||||
{
|
||||
uuid: UUID;
|
||||
}
|
||||
|
||||
table AssetA
|
||||
{
|
||||
asset_header: AssetHeader;
|
||||
|
||||
health: uint;
|
||||
mana: uint;
|
||||
|
||||
refs: [Ref];
|
||||
ref: Ref;
|
||||
}
|
||||
|
||||
root_type AssetA;
|
||||
@@ -1,69 +0,0 @@
|
||||
/*********************************************************************
|
||||
* \file AssetA.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date February 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINETESTS_ASSETA_HPP
|
||||
#define BIGFOOT_ENGINETESTS_ASSETA_HPP
|
||||
#include <Engine/BigFile/Asset/AssetContainer.hpp>
|
||||
|
||||
#include <EngineTests/BigFile/Asset/AssetA_generated.hpp>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
class AssetA
|
||||
{
|
||||
public:
|
||||
using FLAT_ASSET = Flat::AssetA;
|
||||
|
||||
AssetA(FlatAssetWrapper<Flat::AssetA>* p_flatAsset):
|
||||
m_flatAsset(p_flatAsset)
|
||||
{
|
||||
// deprecation...
|
||||
if (m_flatAsset->Asset().asset_header->version < 2)
|
||||
{
|
||||
m_flatAsset->Asset().asset_header->version = 2;
|
||||
}
|
||||
}
|
||||
|
||||
AssetA(const AssetA& p_assetA) = default;
|
||||
AssetA(AssetA&& p_assetA) = default;
|
||||
|
||||
[[nodiscard]]
|
||||
std::uint32_t& Health()
|
||||
{
|
||||
return m_flatAsset->Asset().health;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
std::uint32_t& Mana()
|
||||
{
|
||||
return m_flatAsset->Asset().mana;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
Flat::AssetHeaderT* AssetHeader()
|
||||
{
|
||||
return m_flatAsset->Asset().asset_header.get();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
const Flat::AssetHeaderT* AssetHeader() const
|
||||
{
|
||||
return m_flatAsset->Asset().asset_header.get();
|
||||
}
|
||||
|
||||
~AssetA() = default;
|
||||
|
||||
AssetA& operator=(const AssetA& p_assetA) = default;
|
||||
AssetA& operator=(AssetA&& p_assetA) = default;
|
||||
|
||||
private:
|
||||
FlatAssetWrapper<Flat::AssetA>* m_flatAsset;
|
||||
};
|
||||
|
||||
using AssetAContainer = AssetContainer<AssetA>;
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif
|
||||
@@ -1,331 +0,0 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_ASSETA_BIGFOOT_FLAT_H_
|
||||
#define FLATBUFFERS_GENERATED_ASSETA_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 "Engine/BigFile/Asset/AssetHeader_generated.hpp"
|
||||
|
||||
#include "EASTL/unique_ptr.h"
|
||||
#include "EASTL/string.h"
|
||||
|
||||
namespace Bigfoot {
|
||||
namespace Flat {
|
||||
|
||||
struct Ref;
|
||||
|
||||
struct AssetA;
|
||||
struct AssetABuilder;
|
||||
struct AssetAT;
|
||||
|
||||
inline const ::flatbuffers::TypeTable *RefTypeTable();
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetATypeTable();
|
||||
|
||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) Ref FLATBUFFERS_FINAL_CLASS {
|
||||
private:
|
||||
Bigfoot::Flat::UUID uuid_;
|
||||
|
||||
public:
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return RefTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.Ref";
|
||||
}
|
||||
Ref()
|
||||
: uuid_() {
|
||||
}
|
||||
Ref(const Bigfoot::Flat::UUID &_uuid)
|
||||
: uuid_(_uuid) {
|
||||
}
|
||||
const Bigfoot::Flat::UUID &uuid() const {
|
||||
return uuid_;
|
||||
}
|
||||
};
|
||||
FLATBUFFERS_STRUCT_END(Ref, 16);
|
||||
|
||||
struct Ref::Traits {
|
||||
using type = Ref;
|
||||
};
|
||||
|
||||
struct AssetAT : public ::flatbuffers::NativeTable {
|
||||
typedef AssetA TableType;
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.AssetAT";
|
||||
}
|
||||
eastl::unique_ptr<Bigfoot::Flat::AssetHeaderT> asset_header{};
|
||||
uint32_t health = 0;
|
||||
uint32_t mana = 0;
|
||||
std::vector<Bigfoot::Flat::Ref> refs{};
|
||||
eastl::unique_ptr<Bigfoot::Flat::Ref> ref{};
|
||||
AssetAT() = default;
|
||||
AssetAT(const AssetAT &o);
|
||||
AssetAT(AssetAT&&) FLATBUFFERS_NOEXCEPT = default;
|
||||
AssetAT &operator=(AssetAT o) FLATBUFFERS_NOEXCEPT;
|
||||
};
|
||||
|
||||
struct AssetA FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef AssetAT NativeTableType;
|
||||
typedef AssetABuilder Builder;
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AssetATypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.AssetA";
|
||||
}
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_ASSET_HEADER = 4,
|
||||
VT_HEALTH = 6,
|
||||
VT_MANA = 8,
|
||||
VT_REFS = 10,
|
||||
VT_REF = 12
|
||||
};
|
||||
const Bigfoot::Flat::AssetHeader *asset_header() const {
|
||||
return GetPointer<const Bigfoot::Flat::AssetHeader *>(VT_ASSET_HEADER);
|
||||
}
|
||||
uint32_t health() const {
|
||||
return GetField<uint32_t>(VT_HEALTH, 0);
|
||||
}
|
||||
uint32_t mana() const {
|
||||
return GetField<uint32_t>(VT_MANA, 0);
|
||||
}
|
||||
const ::flatbuffers::Vector<const Bigfoot::Flat::Ref *> *refs() const {
|
||||
return GetPointer<const ::flatbuffers::Vector<const Bigfoot::Flat::Ref *> *>(VT_REFS);
|
||||
}
|
||||
const Bigfoot::Flat::Ref *ref() const {
|
||||
return GetStruct<const Bigfoot::Flat::Ref *>(VT_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<uint32_t>(verifier, VT_HEALTH, 4) &&
|
||||
VerifyField<uint32_t>(verifier, VT_MANA, 4) &&
|
||||
VerifyOffset(verifier, VT_REFS) &&
|
||||
verifier.VerifyVector(refs()) &&
|
||||
VerifyField<Bigfoot::Flat::Ref>(verifier, VT_REF, 1) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
AssetAT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
void UnPackTo(AssetAT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
static ::flatbuffers::Offset<AssetA> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
};
|
||||
|
||||
struct AssetABuilder {
|
||||
typedef AssetA Table;
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_asset_header(::flatbuffers::Offset<Bigfoot::Flat::AssetHeader> asset_header) {
|
||||
fbb_.AddOffset(AssetA::VT_ASSET_HEADER, asset_header);
|
||||
}
|
||||
void add_health(uint32_t health) {
|
||||
fbb_.AddElement<uint32_t>(AssetA::VT_HEALTH, health, 0);
|
||||
}
|
||||
void add_mana(uint32_t mana) {
|
||||
fbb_.AddElement<uint32_t>(AssetA::VT_MANA, mana, 0);
|
||||
}
|
||||
void add_refs(::flatbuffers::Offset<::flatbuffers::Vector<const Bigfoot::Flat::Ref *>> refs) {
|
||||
fbb_.AddOffset(AssetA::VT_REFS, refs);
|
||||
}
|
||||
void add_ref(const Bigfoot::Flat::Ref *ref) {
|
||||
fbb_.AddStruct(AssetA::VT_REF, ref);
|
||||
}
|
||||
explicit AssetABuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
::flatbuffers::Offset<AssetA> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<AssetA>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<AssetA> CreateAssetA(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<Bigfoot::Flat::AssetHeader> asset_header = 0,
|
||||
uint32_t health = 0,
|
||||
uint32_t mana = 0,
|
||||
::flatbuffers::Offset<::flatbuffers::Vector<const Bigfoot::Flat::Ref *>> refs = 0,
|
||||
const Bigfoot::Flat::Ref *ref = nullptr) {
|
||||
AssetABuilder builder_(_fbb);
|
||||
builder_.add_ref(ref);
|
||||
builder_.add_refs(refs);
|
||||
builder_.add_mana(mana);
|
||||
builder_.add_health(health);
|
||||
builder_.add_asset_header(asset_header);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct AssetA::Traits {
|
||||
using type = AssetA;
|
||||
static auto constexpr Create = CreateAssetA;
|
||||
};
|
||||
|
||||
::flatbuffers::Offset<AssetA> CreateAssetA(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
inline AssetAT::AssetAT(const AssetAT &o)
|
||||
: asset_header((o.asset_header) ? new Bigfoot::Flat::AssetHeaderT(*o.asset_header) : nullptr),
|
||||
health(o.health),
|
||||
mana(o.mana),
|
||||
refs(o.refs),
|
||||
ref((o.ref) ? new Bigfoot::Flat::Ref(*o.ref) : nullptr) {
|
||||
}
|
||||
|
||||
inline AssetAT &AssetAT::operator=(AssetAT o) FLATBUFFERS_NOEXCEPT {
|
||||
std::swap(asset_header, o.asset_header);
|
||||
std::swap(health, o.health);
|
||||
std::swap(mana, o.mana);
|
||||
std::swap(refs, o.refs);
|
||||
std::swap(ref, o.ref);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline AssetAT *AssetA::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
auto _o = std::make_unique<AssetAT>();
|
||||
UnPackTo(_o.get(), _resolver);
|
||||
return _o.release();
|
||||
}
|
||||
|
||||
inline void AssetA::UnPackTo(AssetAT *_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 = health(); _o->health = _e; }
|
||||
{ auto _e = mana(); _o->mana = _e; }
|
||||
{ auto _e = refs(); if (_e) { _o->refs.resize(_e->size()); for (::flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->refs[_i] = *_e->Get(_i); } } else { _o->refs.resize(0); } }
|
||||
{ auto _e = ref(); if (_e) _o->ref = eastl::unique_ptr<Bigfoot::Flat::Ref>(new Bigfoot::Flat::Ref(*_e)); }
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetA> CreateAssetA(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
return AssetA::Pack(_fbb, _o, _rehasher);
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetA> AssetA::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetAT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
(void)_rehasher;
|
||||
(void)_o;
|
||||
struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetAT* __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 _health = _o->health;
|
||||
auto _mana = _o->mana;
|
||||
auto _refs = _fbb.CreateVectorOfStructs(_o->refs);
|
||||
auto _ref = _o->ref ? _o->ref.get() : nullptr;
|
||||
return Bigfoot::Flat::CreateAssetA(
|
||||
_fbb,
|
||||
_asset_header,
|
||||
_health,
|
||||
_mana,
|
||||
_refs,
|
||||
_ref);
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *RefTypeTable() {
|
||||
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 },
|
||||
{ ::flatbuffers::ET_UINT, 0, -1 },
|
||||
{ ::flatbuffers::ET_UINT, 0, -1 },
|
||||
{ ::flatbuffers::ET_SEQUENCE, 1, 1 },
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 1 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Bigfoot::Flat::AssetHeaderTypeTable,
|
||||
Bigfoot::Flat::RefTypeTable
|
||||
};
|
||||
static const char * const names[] = {
|
||||
"asset_header",
|
||||
"health",
|
||||
"mana",
|
||||
"refs",
|
||||
"ref"
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const Bigfoot::Flat::AssetA *GetAssetA(const void *buf) {
|
||||
return ::flatbuffers::GetRoot<Bigfoot::Flat::AssetA>(buf);
|
||||
}
|
||||
|
||||
inline const Bigfoot::Flat::AssetA *GetSizePrefixedAssetA(const void *buf) {
|
||||
return ::flatbuffers::GetSizePrefixedRoot<Bigfoot::Flat::AssetA>(buf);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifyAssetABuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifyBuffer<Bigfoot::Flat::AssetA>(nullptr);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifySizePrefixedAssetABuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifySizePrefixedBuffer<Bigfoot::Flat::AssetA>(nullptr);
|
||||
}
|
||||
|
||||
inline const char *AssetAExtension() {
|
||||
return "bfbs";
|
||||
}
|
||||
|
||||
inline void FinishAssetABuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Bigfoot::Flat::AssetA> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedAssetABuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Bigfoot::Flat::AssetA> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Bigfoot::Flat::AssetAT> UnPackAssetA(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Bigfoot::Flat::AssetAT>(GetAssetA(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Bigfoot::Flat::AssetAT> UnPackSizePrefixedAssetA(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Bigfoot::Flat::AssetAT>(GetSizePrefixedAssetA(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
} // namespace Flat
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_ASSETA_BIGFOOT_FLAT_H_
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user