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
IStorage Struct Referenceabstract

Polymorphic base interface for all component storage types, allowing untyped manipulation of components. More...

#include <ComponentStorage.hpp>

Inheritance diagram for IStorage:
ComponentStorage< T >

Public Member Functions

virtual ~IStorage ()=default
 Virtual destructor.
virtual size_t size () const =0
 Returns the number of component instances stored.
virtual void removeEntity (Entity e)=0
 Removes the component associated with the given entity.
virtual const std::vector< Entity > & getEntities () const =0
 Returns list of entities mapped to components.

Detailed Description

Polymorphic base interface for all component storage types, allowing untyped manipulation of components.

Constructor & Destructor Documentation

◆ ~IStorage()

virtual IStorage::~IStorage ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ getEntities()

virtual const std::vector< Entity > & IStorage::getEntities ( ) const
pure virtual

Returns list of entities mapped to components.

Returns
Reference to vector of entities.

Implemented in ComponentStorage< T >.

◆ removeEntity()

virtual void IStorage::removeEntity ( Entity e)
pure virtual

Removes the component associated with the given entity.

Parameters
eThe entity to remove.

Implemented in ComponentStorage< T >.

◆ size()

virtual size_t IStorage::size ( ) const
pure virtual

Returns the number of component instances stored.

Returns
Size of the storage.

Implemented in ComponentStorage< T >.


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