guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
guillaume::ecs::EntityComponentNotFoundException< ComponentType > Class Template Reference

Thrown by ComponentRegistry::getComponent when the entity has no component of the requested type. More...

#include <headers/guillaume/ecs/component_registry.hpp>

Inheritance diagram for guillaume::ecs::EntityComponentNotFoundException< ComponentType >:
Collaboration diagram for guillaume::ecs::EntityComponentNotFoundException< ComponentType >:

Public Member Functions

 EntityComponentNotFoundException (const Entity::Identifier &entityIdentifier)
 Build the exception and its message.
const char * what (void) const noexcept override
 Get the exception message.

Detailed Description

template<InheritFromComponent ComponentType>
class guillaume::ecs::EntityComponentNotFoundException< ComponentType >

Thrown by ComponentRegistry::getComponent when the entity has no component of the requested type.

The message names the component type and the entity identifier. Call ComponentRegistry::hasComponent first when the component is optional.

Template Parameters
ComponentTypeThe type of the missing component.

Definition at line 54 of file component_registry.hpp.

Constructor & Destructor Documentation

◆ EntityComponentNotFoundException()

template<InheritFromComponent ComponentType>
guillaume::ecs::EntityComponentNotFoundException< ComponentType >::EntityComponentNotFoundException ( const Entity::Identifier & entityIdentifier)

Build the exception and its message.

Parameters
entityIdentifierThe identifier of the entity that lacks the component.

Member Function Documentation

◆ what()

template<InheritFromComponent ComponentType>
const char * guillaume::ecs::EntityComponentNotFoundException< ComponentType >::what ( void ) const
overridenoexcept

Get the exception message.

Returns
A null-terminated string owned by the exception, of the form "Component of type X not found for entity N".

The documentation for this class was generated from the following file: