Skip to content

EntropyEngine::Core::Debug::AutoDebugRegistered

EntropyEngine::Core::Debug::AutoDebugRegistered

Section titled “EntropyEngine::Core::Debug::AutoDebugRegistered”

RAII wrapper for automatic debug registration. More…

#include <Debug.h>

Inherits from T

Name
~AutoDebugRegistered()
template <typename… Args>
AutoDebugRegistered(std::string_view typeName, Args &&… args)
template <typename T >
class EntropyEngine::Core::Debug::AutoDebugRegistered;

RAII wrapper for automatic debug registration.

Template Parameters:

  • T The base class that implements INamed

Inherit from this to get automatic registration/unregistration. No more forgetting to unregister!

// Instead of:
class MySystem : public INamed {
MySystem() : INamed("MySystem") {
DebugRegistry::getInstance().registerObject(this, "MySystem");
}
~MySystem() {
DebugRegistry::getInstance().unregisterObject(this);
}
};
// Just do:
class MySystem : public AutoDebugRegistered<INamed> {
MySystem() : AutoDebugRegistered("MySystem", "MySystem") {}
};
inline ~AutoDebugRegistered()
template <typename... Args>
inline explicit AutoDebugRegistered(
std::string_view typeName,
Args &&... args
)

Updated on 2026-01-26 at 17:14:35 -0500