EntropyEngine::Core::Debug::Named
EntropyEngine::Core::Debug::Named
Section titled “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
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| virtual void | setName(std::string_view name) override Set the debug name for this object. |
| virtual std::string_view | getName() const override Get the debug name of this object. |
| Named() =default | |
| Named(std::string_view name) |
Additional inherited members
Section titled “Additional inherited members”Public Functions inherited from EntropyEngine::Core::Debug::INamed
| Name | |
|---|---|
| virtual | ~INamed() =default |
| virtual bool | hasName() const Check if this object has a debug name set. |
Detailed Description
Section titled “Detailed Description”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 inheritanceclass MySystem : public Named {public: MySystem() : Named("MySystem") {}};
// Multiple inheritanceclass MyComponent : public Component, public Named {public: MyComponent(std::string_view name) : Named(name) {}};
// Virtual inheritance for diamond patternsclass MyMultiBase : public virtual Named, public OtherBase { // Avoids naming conflicts through virtual inheritance};Public Functions Documentation
Section titled “Public Functions Documentation”function setName
Section titled “function setName”inline virtual void setName( std::string_view name) overrideSet 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”).
function getName
Section titled “function getName”inline virtual std::string_view getName() const overrideGet 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));}function Named
Section titled “function Named”Named() =defaultfunction Named
Section titled “function Named”inline explicit Named( std::string_view name)Updated on 2026-01-26 at 17:14:35 -0500