BigFile/Sasquatch #1

Merged
rboullard merged 100 commits from BigFile into Development 2026-09-01 16:32:02 +00:00
5 changed files with 9 additions and 18 deletions
Showing only changes of commit 1c2f9344b0 - Show all commits
@@ -147,13 +147,10 @@ class Asset: public AssetBase
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));
const auto header = ::Flat::Bigfoot::AssetHeader::Pack(assetFbb, &m_header);
const auto innerAsset = assetFbb.CreateVector(innerAssetFbb.GetBufferPointer(), innerAssetFbb.GetSize());
assetFbb.Finish(::Flat::Bigfoot::CreateAsset(assetFbb, header, innerAsset));
return eastl::vector<std::byte> {std::bit_cast<std::byte*>(assetFbb.GetBufferPointer()),
std::bit_cast<std::byte*>(assetFbb.GetBufferPointer() + assetFbb.GetSize())};
@@ -167,7 +167,7 @@ struct AssetT : public ::flatbuffers::NativeTable {
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
return "Flat.Bigfoot.AssetT";
}
eastl::unique_ptr<Flat::Bigfoot::AssetHeaderT> header{};
eastl::unique_ptr<Flat::Bigfoot::AssetHeaderT> header{new Flat::Bigfoot::AssetHeaderT()};
eastl::vector<uint8_t> inner_asset{};
AssetT() = default;
AssetT(const AssetT &o);
+3 -6
View File
@@ -28,13 +28,10 @@ class AssetFixture: public ::testing::Test
flatbuffers::FlatBufferBuilder innerAssetFbb;
innerAssetFbb.Finish(ASSET::FLAT_ASSET::Pack(innerAssetFbb, &p_asset));
::Flat::Bigfoot::AssetT asset;
asset.header = eastl::make_unique<::Flat::Bigfoot::AssetHeaderT>(p_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));
const auto header = ::Flat::Bigfoot::AssetHeader::Pack(assetFbb, &p_header);
const auto innerAsset = assetFbb.CreateVector(innerAssetFbb.GetBufferPointer(), innerAssetFbb.GetSize());
assetFbb.Finish(::Flat::Bigfoot::CreateAsset(assetFbb, header, innerAsset));
return eastl::vector<std::byte> {std::bit_cast<std::byte*>(assetFbb.GetBufferPointer()),
std::bit_cast<std::byte*>(assetFbb.GetBufferPointer() + assetFbb.GetSize())};
@@ -20,10 +20,7 @@ struct AssetCTraits
class AssetC: public Asset<AssetCTraits>
{
public:
AssetC()
{
GetAsset().inner_table = eastl::make_unique<::Flat::Bigfoot::InnerTableT>();
}
AssetC() = default;
AssetC(const AssetC& p_asset) = delete;
AssetC(AssetC&& p_asset) = default;
@@ -151,7 +151,7 @@ struct AssetCT : public ::flatbuffers::NativeTable {
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
return "Flat.Bigfoot.AssetCT";
}
eastl::unique_ptr<Flat::Bigfoot::InnerTableT> inner_table{};
eastl::unique_ptr<Flat::Bigfoot::InnerTableT> inner_table{new Flat::Bigfoot::InnerTableT()};
::Bigfoot::HardReference<::Bigfoot::AssetB> asset_b_ref{};
eastl::vector<::Bigfoot::SoftReference<::Bigfoot::AssetB>> asset_b_refs{};
AssetCT() = default;