vecs
Fast, flexible ecs in C++ with ergonomic API
Loading...
Searching...
No Matches
vecs::Query< Components >::Record Struct Reference

A container for a single record and its components, as a result of a query. More...

#include <vecs.h>

Public Types

using RecordComponents
 

Public Member Functions

 operator bool () const
 Implicit bool conversion.
 
bool is_valid () const
 Checks if the Record is valid.
 
auto operator* () const
 Dereferences the record.
 
auto operator* ()
 

Friends

struct Query
 

Detailed Description

template<typename... Components>
struct vecs::Query< Components >::Record

A container for a single record and its components, as a result of a query.

The Record struct represents the result of a single record matching the query

Member Typedef Documentation

◆ RecordComponents

template<typename... Components>
using vecs::Query< Components >::Record::RecordComponents
Initial value:
std::tuple<ComponentStorageType<Components>...>

Member Function Documentation

◆ is_valid()

template<typename... Components>
bool vecs::Query< Components >::Record::is_valid ( ) const
inline

Checks if the Record is valid.

Returns
True if the Record contains valid contents, otherwise false.

◆ operator bool()

template<typename... Components>
vecs::Query< Components >::Record::operator bool ( ) const
inline

Implicit bool conversion.

Returns
is_valid()

◆ operator*()

template<typename... Components>
auto vecs::Query< Components >::Record::operator* ( ) const
inline

Dereferences the record.

Returns
A tuple containing the record contents.
Note
Asserts if called on an invalid Record.

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