Flecs v4.0
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs::untyped_ref Struct Reference

Untyped component reference. More...

#include <ref.hpp>

Inheritance diagram for flecs::untyped_ref:
[legend]

Public Member Functions

 untyped_ref (world_t *world, entity_t entity, flecs::id_t id)
 
 untyped_ref (flecs::entity entity, flecs::id_t id)
 
flecs::entity entity () const
 Return entity associated with reference.
 
flecs::id component () const
 Return component associated with reference.
 
void * get ()
 
bool has ()
 
 operator bool ()
 implicit conversion to bool.
 
void * try_get ()
 

Detailed Description

Untyped component reference.

Reference to a component from a specific entity.

Definition at line 22 of file ref.hpp.

Constructor & Destructor Documentation

◆ untyped_ref() [1/3]

flecs::untyped_ref::untyped_ref ( )
inline

Definition at line 24 of file ref.hpp.

◆ untyped_ref() [2/3]

flecs::untyped_ref::untyped_ref ( world_t * world,
entity_t entity,
flecs::id_t id )
inline

Definition at line 26 of file ref.hpp.

◆ untyped_ref() [3/3]

flecs::untyped_ref::untyped_ref ( flecs::entity entity,
flecs::id_t id )
inline

Definition at line 10 of file impl.hpp.

Member Function Documentation

◆ component()

flecs::id flecs::untyped_ref::component ( ) const
inline

Return component associated with reference.

Definition at line 50 of file ref.hpp.

◆ entity()

flecs::entity flecs::untyped_ref::entity ( ) const
inline

Return entity associated with reference.

Definition at line 13 of file impl.hpp.

◆ get()

void * flecs::untyped_ref::get ( )
inline

Definition at line 54 of file ref.hpp.

◆ has()

bool flecs::untyped_ref::has ( )
inline

Definition at line 58 of file ref.hpp.

◆ operator bool()

flecs::untyped_ref::operator bool ( )
inline

implicit conversion to bool.

return true if there is a valid component instance being referred to

Definition at line 64 of file ref.hpp.

◆ try_get()

void * flecs::untyped_ref::try_get ( )
inline

Definition at line 68 of file ref.hpp.


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