Flecs: Entities
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.0 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
Classes | Functions
Entities
C++ API » Core

Entity operations. More...

Collaboration diagram for Entities:

## Classes
struct | flecs::entity
| Entity. More...
struct | flecs::entity_view
| Entity view. More...
struct | flecs::entity_builder< Self >
| Entity builder. More...

## Functions
template<typename E>
E | flecs::entity_view::to_constant () const
| Convert entity to enum constant.
template<typename... Args>
flecs::entity | flecs::world::entity (Args &&... args) const
| Create an entity.
template<typename E, if_t< is_enum< E >::value > = 0>
flecs::id | flecs::world::id (E value) const
| Convert enum constant to entity.
template<typename E, if_t< is_enum< E >::value > = 0>
flecs::entity | flecs::world::entity (E value) const
| Convert enum constant to entity.
template<typename... Args>
flecs::entity | flecs::world::prefab (Args &&... args) const
| Create a prefab.
template<typename T>
flecs::entity | flecs::world::entity (const char *name=nullptr) const
| Create an entity that's associated with a type.
template<typename T>
flecs::entity | flecs::world::prefab (const char *name=nullptr) const
| Create a prefab that's associated with a type.
template<typename E, if_t< is_enum< E >::value > = 0>
flecs::entity | flecs::world::to_entity (E constant) const
| Convert enum constant to entity.

## Detailed Description

Entity operations.

## Function Documentation

## ◆ entity() [1/3]

template<typename... Args>

flecs::entity flecs::world::entity | ( | Args &&... | args | ) | const
| inline

Create an entity.

Definition at line 206 of file impl.hpp.

## ◆ entity() [2/3]

template<typename T>

flecs::entity flecs::world::entity | ( | const char * | name = nullptr | ) | const
| inline

Create an entity that's associated with a type.

Definition at line 223 of file impl.hpp.

## ◆ entity() [3/3]

template<typename E, if_t< is_enum< E >::value >>

flecs::entity flecs::world::entity | ( | E | value | ) | const
| inline

Convert enum constant to entity.

Definition at line 217 of file impl.hpp.

## ◆ id()

template<typename E, if_t< is_enum< E >::value >>

flecs::id flecs::world::id | ( | E | value | ) | const
| inline

Convert enum constant to entity.

Definition at line 211 of file impl.hpp.

## ◆ prefab() [1/2]

template<typename... Args>

flecs::entity flecs::world::prefab | ( | Args &&... | args | ) | const
| inline

Create a prefab.

Definition at line 228 of file impl.hpp.

## ◆ prefab() [2/2]

template<typename T>

flecs::entity flecs::world::prefab | ( | const char * | name = nullptr | ) | const
| inline

Create a prefab that's associated with a type.

Definition at line 235 of file impl.hpp.

## ◆ to_constant()

template<typename E>

E flecs::entity_view::to_constant | ( |  | ) | const
| inline

Convert entity to enum constant.

Definition at line 11 of file impl.hpp.

## ◆ to_entity()

template<typename E, if_t< is_enum< E >::value >>

flecs::entity flecs::world::to_entity | ( | E | constant | ) | const
| inline

Convert enum constant to entity.

Definition at line 26 of file impl.hpp.