Function remove

Summary

#include <include/flecs/addons/cpp/mixins/entity/builder.hpp>

(1) template <typename T, if_not_t< is_enum< T >::value > = 0>
    Self & remove()

(2) Self & remove(entity_t entity)

(3) Self & remove(entity_t first, entity_t second)

(4) template <typename First, typename Second>
    Self & remove()

(5) template <typename First, typename Second, if_not_t< is_enum< Second >::value > = 0>
    Self & remove(Second second)

(6) template <typename First, typename Second, if_t< is_enum< Second >::value > = 0>
    Self & remove(Second constant)

(7) template <typename E, if_t< is_enum< E >::value > = 0>
    Self & remove()

Function overload

Synopsis

#include <include/flecs/addons/cpp/mixins/entity/builder.hpp>

template <typename T, if_not_t< is_enum< T >::value > = 0>
Self & remove()

Description

Remove a component from an entity.

Template Parameters

T - the type of the component to remove.

Source

Lines 264-268 in include/flecs/addons/cpp/mixins/entity/builder.hpp.

template <typename T, if_not_t< is_enum<T>::value > = 0>
Self& remove() {
    ecs_remove_id(this->m_world, this->m_id, _::cpp_type<T>::id(this->m_world));
    return to_base();
}

Synopsis

#include <include/flecs/addons/cpp/mixins/entity/builder.hpp>

Self & remove(entity_t entity)

Description

Remove an entity from an entity.

Parameters

entity - The entity to remove.

Source

Lines 274-277 in include/flecs/addons/cpp/mixins/entity/builder.hpp.

Self& remove(entity_t entity) {
    ecs_remove_id(this->m_world, this->m_id, entity);
    return to_base();
}

Synopsis

#include <include/flecs/addons/cpp/mixins/entity/builder.hpp>

Self & remove(entity_t first, entity_t second)

Description

Remove a pair. This operation removes a pair from the entity.

Parameters

first - The first element of the pair.

second - The second element of the pair.

Source

Lines 285-288 in include/flecs/addons/cpp/mixins/entity/builder.hpp.

Self& remove(entity_t first, entity_t second) {
    ecs_remove_pair(this->m_world, this->m_id, first, second);
    return to_base();
}

Synopsis

#include <include/flecs/addons/cpp/mixins/entity/builder.hpp>

template <typename First, typename Second>
Self & remove()

Description

Removes a pair. This operation removes a pair from the entity.

Template Parameters

First - The first element of the pair

Second - The second element of the pair

Source

Lines 296-299 in include/flecs/addons/cpp/mixins/entity/builder.hpp.

template<typename First, typename Second>
Self& remove() {
    return this->remove<First>(_::cpp_type<Second>::id(this->m_world));
}

Synopsis

#include <include/flecs/addons/cpp/mixins/entity/builder.hpp>

template <typename First, typename Second, if_not_t< is_enum< Second >::value > = 0>
Self & remove(Second second)

Description

Remove a pair. This operation adds a pair to the entity.

Template Parameters

First - The first element of the pair

Parameters

second - The second element of the pair.

Source

Lines 307-310 in include/flecs/addons/cpp/mixins/entity/builder.hpp.

template<typename First, typename Second, if_not_t< is_enum<Second>::value > = 0>
Self& remove(Second second) {
    return this->remove(_::cpp_type<First>::id(this->m_world), second);
}

Synopsis

#include <include/flecs/addons/cpp/mixins/entity/builder.hpp>

template <typename First, typename Second, if_t< is_enum< Second >::value > = 0>
Self & remove(Second constant)

Description

Remove a pair. This operation adds a pair to the entity.

Template Parameters

First - The first element of the pair

Parameters

constant - the enum constant.

Source

Lines 329-334 in include/flecs/addons/cpp/mixins/entity/builder.hpp.

template<typename First, typename Second, if_t< is_enum<Second>::value > = 0>
Self& remove(Second constant) {
    const auto& et = enum_type<Second>(this->m_world);
    flecs::entity_t second = et.entity(constant);
    return this->remove<First>(second);
}  

Synopsis

#include <include/flecs/addons/cpp/mixins/entity/builder.hpp>

template <typename E, if_t< is_enum< E >::value > = 0>
Self & remove()

Description

Remove pair for enum. This operation will remove any (Enum, *) pair from the entity.

Template Parameters

E - The enumeration type.

Source

Lines 462-466 in include/flecs/addons/cpp/mixins/entity/builder.hpp.

template <typename E, if_t< is_enum<E>::value > = 0>
Self& remove() {
    flecs::entity_t first = _::cpp_type<E>::id(this->m_world);
    return this->remove(first, flecs::Wildcard);
}