ImagoEngine
A C++ 2D game engine built on a sparse-set ECS, with scenes, scheduled systems, events, and action-based input
Loading...
Searching...
No Matches
Imago::ECS::BondHandle< Components > Class Template Reference

Lightweight view over a Bond. This is returned by value from Nexus::Bond<Components...>() and does not deal with the structural changes relevant for bonds but just provieds an iterorator like SurveyHandle does. More...

#include <Imago/ECS/BondHandle.hpp>

Classes

class  Iterator

Public Member Functions

 BondHandle (const Bond *bond)
 Constructs a new BondHandle object, initializing it with is according Bond. This can only be called by the Nexus but does not need the friend class structure because Bonds can only be created and owned by the Nexus.
Iterator begin () const
 Returns an Iterator to the first element.
Iterator end () const
 Returns an Iterator past the last element.

Detailed Description

template<typename... Components>
class Imago::ECS::BondHandle< Components >

Lightweight view over a Bond. This is returned by value from Nexus::Bond<Components...>() and does not deal with the structural changes relevant for bonds but just provieds an iterorator like SurveyHandle does.

Instead of checking every component for memebership in each component pool it just directly iterates over the Bond's sorted region.

Template Parameters
ComponentsThe component types of the Bond.

Constructor & Destructor Documentation

◆ BondHandle()

template<typename... Components>
Imago::ECS::BondHandle< Components >::BondHandle ( const Bond * bond)
inlineexplicit

Constructs a new BondHandle object, initializing it with is according Bond. This can only be called by the Nexus but does not need the friend class structure because Bonds can only be created and owned by the Nexus.

Parameters
bondThe Bond to view and iterate over.

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