Represents the archetype of an entity.
More...
#include <archetype.hpp>
|
|
| archetype () noexcept |
| | Default constructor.
|
| | archetype (const archetype &other) noexcept |
| | Copy constructor.
|
| | archetype (archetype &&other) noexcept |
| | Move constructor.
|
| auto | operator= (const archetype &other) noexcept -> archetype & |
| | Copy assignment operator.
|
| auto | operator= (archetype &&other) noexcept -> archetype & |
| | Move assignment operator.
|
|
| ~archetype () noexcept |
| | Destructor.
|
| void | insert (std::uintmax_t id) noexcept |
| | Inserts a component ID into the archetype.
|
| void | insert (const archetype &other) noexcept |
| | Inserts all component IDs that exist in another instance into the archetype.
|
| auto | contains (std::uintmax_t id) const noexcept -> bool |
| | Evaluates whether the archetype contains a component ID.
|
| auto | operator== (const archetype &other) const noexcept -> bool |
| | Comparison operator.
|
| auto | operator<= (const archetype &other) const noexcept -> bool |
| | Evaluates whether the current instance is the subtype of an other instance.
|
| auto | operator>= (const archetype &other) const noexcept -> bool |
| | Evaluates whether the current instance is the supertype of an other instance.
|
| void | erase (std::uintmax_t id) noexcept |
| | Removes a component ID from the archetype.
|
| void | erase (const archetype &other) noexcept |
| | Removes all component IDs that exist in another instance from the archetype.
|
|
void | clear () noexcept |
| | Removes all component IDs from the archetype.
|
|
| template<typename ... T> |
| static constexpr auto | of () noexcept -> std::conditional_t< static_cast< bool >(sizeof...(T)), const archetype &, archetype > |
| | Retrieves an archetype for a set of component types.
|
Represents the archetype of an entity.
◆ archetype() [1/2]
| stellarlib::ecs::archetype::archetype |
( |
const archetype & | other | ) |
|
|
nodiscardnoexcept |
Copy constructor.
- Parameters
-
◆ archetype() [2/2]
| stellarlib::ecs::archetype::archetype |
( |
archetype && | other | ) |
|
|
nodiscardnoexcept |
Move constructor.
- Parameters
-
◆ of()
template<typename ... T>
| constexpr auto stellarlib::ecs::archetype::of |
( |
| ) |
-> std::conditional_t< static_cast< bool >(sizeof...(T)), const archetype &, archetype > |
|
inlinestaticnodiscardconstexprnoexcept |
Retrieves an archetype for a set of component types.
- Template Parameters
-
- Returns
- Archetype for a set of component types
◆ operator=() [1/2]
Copy assignment operator.
- Parameters
-
- Returns
- Current instance
◆ operator=() [2/2]
Move assignment operator.
- Parameters
-
- Returns
- Current instance
◆ insert() [1/2]
| void stellarlib::ecs::archetype::insert |
( |
std::uintmax_t | id | ) |
|
|
noexcept |
Inserts a component ID into the archetype.
- Parameters
-
◆ insert() [2/2]
| void stellarlib::ecs::archetype::insert |
( |
const archetype & | other | ) |
|
|
noexcept |
Inserts all component IDs that exist in another instance into the archetype.
- Parameters
-
◆ contains()
| auto stellarlib::ecs::archetype::contains |
( |
std::uintmax_t | id | ) |
const -> bool |
|
nodiscardnoexcept |
Evaluates whether the archetype contains a component ID.
- Parameters
-
- Returns
- Whether the archetype contains the component ID
◆ operator==()
| auto stellarlib::ecs::archetype::operator== |
( |
const archetype & | other | ) |
const -> bool |
|
nodiscardnoexcept |
Comparison operator.
- Parameters
-
- Returns
- Result of the comparison
◆ operator<=()
| auto stellarlib::ecs::archetype::operator<= |
( |
const archetype & | other | ) |
const -> bool |
|
nodiscardnoexcept |
Evaluates whether the current instance is the subtype of an other instance.
- Parameters
-
- Returns
- Whether the current instance is the subtype of the other instance
◆ operator>=()
| auto stellarlib::ecs::archetype::operator>= |
( |
const archetype & | other | ) |
const -> bool |
|
nodiscardnoexcept |
Evaluates whether the current instance is the supertype of an other instance.
- Parameters
-
- Returns
- Whether the current instance is the supertype of the other instance
◆ erase() [1/2]
| void stellarlib::ecs::archetype::erase |
( |
std::uintmax_t | id | ) |
|
|
noexcept |
Removes a component ID from the archetype.
- Parameters
-
◆ erase() [2/2]
| void stellarlib::ecs::archetype::erase |
( |
const archetype & | other | ) |
|
|
noexcept |
Removes all component IDs that exist in another instance from the archetype.
- Parameters
-
The documentation for this class was generated from the following file: