Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::svg::RenderingInstanceView Struct Reference

A view containing a list of components::RenderingInstanceComponent which can be iterated over. More...

#include "donner/svg/renderer/common/RenderingInstanceView.h"

Public Types

using StorageType = entt::storage<components::RenderingInstanceComponent>
 The type of the storage used to store the components.
 
using Iterator = StorageType::const_iterator
 Iterator type.
 

Public Member Functions

 RenderingInstanceView (Registry &registry)
 Constructor, takes a registry and creates a view over all components::RenderingInstanceComponent.
 
 ~RenderingInstanceView ()=default
 Destructor.
 
 RenderingInstanceView (const RenderingInstanceView &)=default
 Copy constructor.
 
 RenderingInstanceView (RenderingInstanceView &&)=default
 Move constructor.
 
RenderingInstanceViewoperator= (const RenderingInstanceView &)=delete
 
RenderingInstanceViewoperator= (RenderingInstanceView &&)=delete
 
bool done () const
 Returns true if the view has no more elements.
 
void advance ()
 Advances the view to the next element.
 
Entity currentEntity () const
 Returns the current entity.
 
const components::RenderingInstanceComponentget () const
 Returns the current component.
 

Detailed Description

A view containing a list of components::RenderingInstanceComponent which can be iterated over.

Constructor & Destructor Documentation

◆ RenderingInstanceView()

donner::svg::RenderingInstanceView::RenderingInstanceView ( Registry & registry)
inlineexplicit

Constructor, takes a registry and creates a view over all components::RenderingInstanceComponent.

Parameters
registryThe registry to use.

Member Function Documentation

◆ advance()

void donner::svg::RenderingInstanceView::advance ( )
inline

Advances the view to the next element.

Precondition
List has elements remaining done() is false.

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