Flecs v3.2
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs::ref< T > Struct Template Reference

Component reference. More...

#include <ref.hpp>

Public Member Functions

 ref (world_t *world, entity_t entity, flecs::id_t id=0)
 
T * operator-> ()
 
T * get ()
 
flecs::entity entity () const
 

Detailed Description

template<typename T>
struct flecs::ref< T >

Component reference.

Reference to a component from a specific entity.

Definition at line 23 of file ref.hpp.

Constructor & Destructor Documentation

◆ ref()

template<typename T >
flecs::ref< T >::ref ( world_t *  world,
entity_t  entity,
flecs::id_t  id = 0 
)
inline

Definition at line 24 of file ref.hpp.

Member Function Documentation

◆ entity()

template<typename T >
flecs::entity flecs::ref< T >::entity

Definition at line 11 of file impl.hpp.

◆ get()

template<typename T >
T * flecs::ref< T >::get ( )
inline

Definition at line 49 of file ref.hpp.

◆ operator->()

template<typename T >
T * flecs::ref< T >::operator-> ( )
inline

Definition at line 40 of file ref.hpp.


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