|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
The engine objects one render system owns, keyed by entity identifier. More...
#include <headers/guillaume/systems/render_handle_map.hpp>

Public Member Functions | |
| RenderHandleMap (void)=default | |
| Create an empty map. | |
| ~RenderHandleMap (void)=default | |
| Destroy the map without removing the engine objects it refers to. | |
| void | markAllUnused (void) |
| Clear the used flag of every handle. Call it from the system's prepare(), before any entity is drawn. | |
| void | removeUnused (utility::Engine &engine) |
| Remove from the engine, then from the map, every handle whose used flag is still false. Call it from the system's cleanup(). | |
| RenderHandle * | find (const ecs::Entity::Identifier &identifier) |
| Look up the handle of an entity. | |
| void | insert (const ecs::Entity::Identifier &identifier, RenderHandle handle) |
| Store the handle of an entity, replacing the one it had. | |
| std::size_t | size (void) const |
| Count the entities that have an engine object in this map. | |
| void | clear (void) |
| Forget every handle without calling utility::Engine::removeObject. Use it only when the engine objects are gone already or are destroyed with the engine. | |
The engine objects one render system owns, keyed by entity identifier.
Every render system (RectangleRender, TextRender, ...) inherits from this class. An engine object is created the first time an entity is drawn and updated in place afterwards. An entity that is not drawn during a frame (it was destroyed or lost a component) has its engine object removed at the end of that frame.
The sequence in a render system is:
find() does not set used: a system that finds a handle and forgets to set the flag loses the engine object at cleanup.
Definition at line 88 of file render_handle_map.hpp.
|
inline |
Forget every handle without calling utility::Engine::removeObject. Use it only when the engine objects are gone already or are destroyed with the engine.
Definition at line 185 of file render_handle_map.hpp.

|
inline |
Look up the handle of an entity.
The used flag is left as it is: the caller sets it once the entity has been drawn.
| identifier | The entity to look up. |
Definition at line 146 of file render_handle_map.hpp.

|
inline |
Store the handle of an entity, replacing the one it had.
A replaced handle is dropped without calling utility::Engine::removeObject: remove the engine object first when the entity already has one.
| identifier | The entity the engine object belongs to. |
| handle | The handle to store, with used set to true if the entity was drawn this frame. |
Definition at line 165 of file render_handle_map.hpp.

|
inline |
Clear the used flag of every handle. Call it from the system's prepare(), before any entity is drawn.
Definition at line 110 of file render_handle_map.hpp.

|
inline |
Remove from the engine, then from the map, every handle whose used flag is still false. Call it from the system's cleanup().
| engine | The engine the objects were created in. |
Definition at line 123 of file render_handle_map.hpp.

|
inline |
Count the entities that have an engine object in this map.
Definition at line 175 of file render_handle_map.hpp.