Skip to content

EntropyEngine::Core::Debug::Named

Simple implementation of INamed that can be inherited. More…

#include <INamed.h>

Inherits from EntropyEngine::Core::Debug::INamed

Inherited by EntropyEngine::Core::Concurrency::WorkGraph

Name
virtual voidsetName(std::string_view name) override
Set the debug name for this object.
virtual std::string_viewgetName() const override
Get the debug name of this object.
Named() =default
Named(std::string_view name)

Public Functions inherited from EntropyEngine::Core::Debug::INamed

Name
virtual~INamed() =default
virtual boolhasName() const
Check if this object has a debug name set.
class EntropyEngine::Core::Debug::Named;

Simple implementation of INamed that can be inherited.

Provides basic INamed implementation with string storage. Inherit to add naming functionality without implementing the interface yourself.

// Direct inheritance
class MySystem : public Named {
public:
MySystem() : Named("MySystem") {}
};
// Multiple inheritance
class MyComponent : public Component, public Named {
public:
MyComponent(std::string_view name) : Named(name) {}
};
// Virtual inheritance for diamond patterns
class MyMultiBase : public virtual Named, public OtherBase {
// Avoids naming conflicts through virtual inheritance
};
inline virtual void setName(
std::string_view name
) override

Set the debug name for this object.

Parameters:

  • name The debug name to assign (can be empty to clear)

Reimplements: EntropyEngine::Core::Debug::INamed::setName

Assigns a name for use in logs and debug output. Choose descriptive names that indicate purpose (e.g., “MainMenuUI”, “PlayerHealthBar”).

inline virtual std::string_view getName() const override

Get the debug name of this object.

Return: The current debug name (may be empty)

Reimplements: EntropyEngine::Core::Debug::INamed::getName

Returns the assigned name or empty string if unnamed.

if (object->hasName()) {
LOG_INFO("Found object: {}", object->getName());
} else {
LOG_INFO("Found unnamed object at {}", static_cast<void*>(object));
}
Named() =default
inline explicit Named(
std::string_view name
)

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