Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
Registry::View< Components > Class Template Reference

Zero-allocation filtered view over entities containing a specific set of components. More...

#include <Registry.hpp>

Classes

struct  Iterator
 Iterator over the entities matching the View filters. More...

Public Member Functions

 View (Registry &reg, IStorage *sm)
 Construct a new View object.
Iterator begin ()
 Returns beginning view iterator.
Iterator end ()
 Returns ending view iterator.

Private Attributes

Registry & registry
IStorage * smallest

Detailed Description

template<typename... Components>
class Registry::View< Components >

Zero-allocation filtered view over entities containing a specific set of components.

Template Parameters
ComponentsComponent filter list.

Constructor & Destructor Documentation

◆ View()

template<typename... Components>
Registry::View< Components >::View ( Registry & reg,
IStorage * sm )
inline

Construct a new View object.

Parameters
regRegistry creating this view.
smSmallest storage containing entities to filter.

Member Function Documentation

◆ begin()

template<typename... Components>
Iterator Registry::View< Components >::begin ( )
inline

Returns beginning view iterator.

◆ end()

template<typename... Components>
Iterator Registry::View< Components >::end ( )
inline

Returns ending view iterator.

Member Data Documentation

◆ registry

template<typename... Components>
Registry& Registry::View< Components >::registry
private

◆ smallest

template<typename... Components>
IStorage* Registry::View< Components >::smallest
private

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