Files
Bigfoot/Bigfoot/Tests/Engine/Include/EngineTests/BigFile/Asset/AssetA.hpp
Romain BOULLARD a99a7e7d88
Some checks failed
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Failing after 16m41s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 17m21s
Bigfoot / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 11m4s
Bigfoot / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 11m44s
Bigfoot / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Failing after 5m30s
Bigfoot / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Failing after 5m34s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Failing after 24m10s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 25m10s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 13m13s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 12m56s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Failing after 10m32s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Failing after 11m17s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Failing after 11m3s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Failing after 11m9s
Bigfoot / Build & Test Release with ./ConanProfiles/clangd (Unity Build: OFF) (push) Failing after 7m46s
Bigfoot / Build & Test Release with ./ConanProfiles/clangd (Unity Build: ON) (push) Failing after 7m42s
Bigfoot / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Failing after 8m8s
Bigfoot / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Failing after 8m9s
Bigfoot / Clang Format Checks (push) Failing after 10s
ReflectionInfo in Asset
2026-04-12 13:40:01 +02:00

77 lines
1.7 KiB
C++

/*********************************************************************
* \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.bfbs_generated.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();
}
[[nodiscard]]
static constexpr eastl::span<const std::byte> ReflectionInfo()
{
return g_AssetA_bfbs;
}
~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