basic testing for reference
Bigfoot / Sonarqube (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 5m52s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 5m46s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 6m18s
Bigfoot / Build & Test Debug with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 6m14s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 7m17s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 6m25s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 8m7s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 7m31s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 6m24s
Bigfoot / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 6m18s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: OFF) (push) Successful in 7m30s
Bigfoot / Build & Test Release with ./ConanProfiles/clang_asan (Unity Build: ON) (push) Successful in 7m6s
Bigfoot / Clang Format Checks (push) Failing after 8s

This commit is contained in:
2026-08-18 14:59:42 +02:00
parent a1e4119311
commit 3c306dd2c7
8 changed files with 240 additions and 20 deletions
@@ -0,0 +1,15 @@
/*********************************************************************
* \file AssetLibrary.cpp
*
* \author Romain BOULLARD
* \date August 2026
*********************************************************************/
#include <Engine/Asset/AssetLibrary.hpp>
namespace Bigfoot
{
void SetActiveAssetLibrary(AssetLibrary* p_assetLibrary)
{
g_activeAssetLibrary = p_assetLibrary;
}
} // namespace Bigfoot
@@ -27,6 +27,17 @@ class ContainerHandle
~ContainerHandle() = default;
/*
* Get the HardRef count
*
* \return The HardRef count.
*/
[[nodiscard]]
std::uint32_t GetHardRefCount() const
{
return m_hardRefCount;
}
/*
* Increment the HardRef count
*
@@ -45,6 +56,17 @@ class ContainerHandle
--m_hardRefCount;
}
/*
* Get the SoftRef count
*
* \return The SoftRef count.
*/
[[nodiscard]]
std::uint32_t GetSoftRefCount() const
{
return m_softRefCount;
}
/*
* Increment the SoftRef count
*
@@ -163,13 +163,22 @@ inline AssetLibrary* g_activeAssetLibrary = &g_assetLibrary;
/****************************************************************************************/
/*
* Set the active asset library
*
* \param p_assetLibrary The asset library to set g_activeAssetLibrary to.
*/
void SetActiveAssetLibrary(AssetLibrary* p_assetLibrary);
/****************************************************************************************/
class ScopedActiveAssetLibrary
{
public:
ScopedActiveAssetLibrary(AssetLibrary* p_assetLibrary):
m_previous(g_activeAssetLibrary)
{
g_activeAssetLibrary = p_assetLibrary;
SetActiveAssetLibrary(p_assetLibrary);
}
ScopedActiveAssetLibrary(const ScopedActiveAssetLibrary& p_scopedActiveAssetLibrary) = default;
@@ -177,7 +186,7 @@ class ScopedActiveAssetLibrary
~ScopedActiveAssetLibrary()
{
g_activeAssetLibrary = m_previous;
SetActiveAssetLibrary(m_previous);
}
ScopedActiveAssetLibrary& operator=(const ScopedActiveAssetLibrary& p_scopedActiveAssetLibrary) = default;
@@ -692,7 +692,7 @@ class StableSlotMap
[[nodiscard]]
T* Get(const SlotMapKey p_key)
{
return const_cast<T*>(std::as_const(*this).Get(p_key));
return Has(p_key) ? GetPageAt(GetPageIndex(p_key))->Get(GetDataOffset(p_key)) : nullptr;
}
[[nodiscard]]