correctness
Some checks failed
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 1m30s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Has been cancelled
Bigfoot / Clang Format Checks (push) Has been cancelled
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled

This commit is contained in:
2026-04-26 15:19:30 +02:00
parent 1b3c914037
commit 60f312a97e
2 changed files with 28 additions and 0 deletions

View File

@@ -29,21 +29,30 @@ class Asset
{
}
Asset(const Asset& p_asset) = default;
Asset(Asset&& p_asset) = default;
~Asset() = default;
[[nodiscard]]
const Bigfoot::Flat::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> Pack() const
{
flatbuffers::FlatBufferBuilder assetFbb;
@@ -70,6 +79,7 @@ class Asset
m_header.version = p_version;
}
[[nodiscard]]
static std::uint64_t GetTypeID()
{
static const std::uint64_t typeID = rapidhash(FLAT_ASSET::GetFullyQualifiedName(),
@@ -77,12 +87,19 @@ class Asset
return typeID;
}
[[nodiscard]]
static eastl::string_view GetTypeName()
{
return FLAT_ASSET::GetFullyQualifiedName();
}
[[nodiscard]]
Asset& operator=(const Asset& p_asset) = default;
[[nodiscard]]
Asset& operator=(Asset&& p_asset) = default;
private:
[[nodiscard]]
static Bigfoot::Flat::AssetHeaderT UnPackHeader(const eastl::span<const std::byte> p_flatbuffer)
{
Bigfoot::Flat::AssetHeaderT header;
@@ -92,6 +109,7 @@ class Asset
return header;
}
[[nodiscard]]
static typename FLAT_ASSET::NativeTableType UnpackAsset(const eastl::span<const std::byte> p_flatbuffer)
{
typename FLAT_ASSET::NativeTableType asset;

View File

@@ -21,6 +21,16 @@ class AssetA: public Asset<Flat::AssetA>
Asset(p_flatbuffer)
{
}
AssetA(const AssetA& p_asset) = default;
AssetA(AssetA&& p_asset) = default;
~AssetA() = default;
[[nodiscard]]
AssetA& operator=(const AssetA& p_asset) = default;
[[nodiscard]]
AssetA& operator=(AssetA&& p_asset) = default;
};
} // namespace Bigfoot