Flecs v3.2
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
component.hpp File Reference

Registering/obtaining info from components. More...

#include <ctype.h>
#include <stdio.h>
#include "mixins/meta/untyped_component.inl"
#include "mixins/metrics/untyped_component.inl"
#include "mixins/meta/component.inl"
Include dependency graph for component.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  flecs::_::cpp_type_impl< T >
 
struct  flecs::_::cpp_type< T, if_not_t< is_pair< T >::value > >
 
struct  flecs::_::cpp_type< T, if_t< is_pair< T >::value > >
 
struct  flecs::untyped_component
 Untyped component class. More...
 
struct  flecs::component< T >
 Component class. More...
 

Namespaces

namespace  flecs::_
 Int to enum.
 

Functions

template<>
const char * flecs::_::symbol_name< uint8_t > ()
 
template<>
const char * flecs::_::symbol_name< uint16_t > ()
 
template<>
const char * flecs::_::symbol_name< uint32_t > ()
 
template<>
const char * flecs::_::symbol_name< uint64_t > ()
 
template<>
const char * flecs::_::symbol_name< int8_t > ()
 
template<>
const char * flecs::_::symbol_name< int16_t > ()
 
template<>
const char * flecs::_::symbol_name< int32_t > ()
 
template<>
const char * flecs::_::symbol_name< int64_t > ()
 
template<>
const char * flecs::_::symbol_name< float > ()
 
template<>
const char * flecs::_::symbol_name< double > ()
 
template<typename T , enable_if_t< std::is_trivial< T >::value==true > * = nullptr>
void flecs::_::register_lifecycle_actions (ecs_world_t *, ecs_entity_t)
 
template<typename T >
flecs::entity_t flecs::type_id ()
 Get id currently assigned to component.
 
void flecs::reset ()
 Reset static component ids.
 

Detailed Description

Registering/obtaining info from components.

Definition in file component.hpp.

Function Documentation

◆ type_id()

template<typename T >
flecs::entity_t flecs::type_id ( )

Get id currently assigned to component.

If no world has registered the component yet, this operation will return 0.

Definition at line 517 of file component.hpp.