AssetContainer concept
Some checks failed
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 43s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 36s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Failing after 10s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Failing after 9s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Failing after 19s
Bigfoot / Clang Format Checks (push) Successful in 10s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Failing after 11m40s

This commit is contained in:
2026-02-11 12:03:15 +01:00
parent e4bcf5563c
commit 75bd0bf441
3 changed files with 70 additions and 2 deletions

View File

@@ -17,8 +17,8 @@ namespace Bigfoot
{ {
template<typename FLAT_ASSET> template<typename FLAT_ASSET>
concept FlatAssetConcept = requires(FLAT_ASSET p_flatAsset) { concept FlatAssetConcept = requires(FLAT_ASSET p_flatAsset) {
requires std::is_base_of_v<::flatbuffers::Table, FLAT_ASSET>; requires std::is_base_of_v<::flatbuffers::Table, FLAT_ASSET> &&
requires std::derived_from<typename FLAT_ASSET::NativeTableType, ::flatbuffers::NativeTable>; std::derived_from<typename FLAT_ASSET::NativeTableType, ::flatbuffers::NativeTable>;
{ FLAT_ASSET::GetFullyQualifiedName() } -> std::convertible_to<const char*>; { FLAT_ASSET::GetFullyQualifiedName() } -> std::convertible_to<const char*>;
{ p_flatAsset.asset_header() } -> std::same_as<const Bigfoot::Flat::AssetHeader*>; { p_flatAsset.asset_header() } -> std::same_as<const Bigfoot::Flat::AssetHeader*>;

View File

@@ -0,0 +1,32 @@
/*********************************************************************
* \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 <unordered_map>
namespace Bigfoot
{
template<typename ASSET>
concept BigfootAssetConcept = requires(ASSET p_asset) {
requires FlatAssetConcept<typename ASSET::FLAT_ASSET> &&
std::constructible_from<ASSET, FlatAssetWrapper<typename ASSET::FLAT_ASSET>>;
};
template<BigfootAssetConcept ASSET>
class AssetContainer
{
public:
private:
};
} // namespace Bigfoot
#endif

View File

@@ -0,0 +1,36 @@
/*********************************************************************
* \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(const FlatAssetWrapper<Flat::AssetA>& p_flatAsset);
AssetA(const AssetA& p_assetA) = default;
AssetA(AssetA&& p_assetA) = default;
~AssetA() = default;
AssetA& operator=(const AssetA& p_assetA) = default;
AssetA& operator=(AssetA&& p_assetA) = default;
private:
};
using AssetAContainer = AssetContainer<AssetA>;
} // namespace Bigfoot
#endif