Function owns

Summary

#include <include/flecs/addons/cpp/entity_view.hpp>

(1) bool owns(flecs::id_t e) const

(2) template <typename First>
    bool owns(flecs::id_t second) const

(3) bool owns(flecs::id_t first, flecs::id_t second) const

(4) template <typename T>
    bool owns() const

(5) template <typename First, typename Second>
    bool owns() const

Function overload

Synopsis

#include <include/flecs/addons/cpp/entity_view.hpp>

bool owns(flecs::id_t e) const

Description

Check if entity owns the provided entity. An entity is owned if it is not shared from a base entity.

Parameters

e - The entity to check.

Returns
True if the entity owns the provided entity, false otherwise.

Source

Lines 489-491 in include/flecs/addons/cpp/entity_view.hpp.

bool owns(flecs::id_t e) const {
    return ecs_owns_id(m_world, m_id, e);
}

Synopsis

#include <include/flecs/addons/cpp/entity_view.hpp>

template <typename First>
bool owns(flecs::id_t second) const

Description

Check if entity owns the provided pair.

Template Parameters

First - The first element of the pair.

Parameters

second - The second element of the pair.

Returns
True if the entity owns the provided component, false otherwise.

Source

Lines 499-503 in include/flecs/addons/cpp/entity_view.hpp.

template <typename First>
bool owns(flecs::id_t second) const {
    auto comp_id = _::cpp_type<First>::id(m_world);
    return owns(ecs_pair(comp_id, second));
}

Synopsis

#include <include/flecs/addons/cpp/entity_view.hpp>

bool owns(flecs::id_t first, flecs::id_t second) const

Description

Check if entity owns the provided pair.

Parameters

first - The first element of the pair.

second - The second element of the pair.

Returns
True if the entity owns the provided component, false otherwise.

Source

Lines 511-513 in include/flecs/addons/cpp/entity_view.hpp.

bool owns(flecs::id_t first, flecs::id_t second) const {
    return owns(ecs_pair(first, second));
}

Synopsis

#include <include/flecs/addons/cpp/entity_view.hpp>

template <typename T>
bool owns() const

Description

Check if entity owns the provided component. An component is owned if it is not shared from a base entity.

Template Parameters

T - The component to check.

Returns
True if the entity owns the provided component, false otherwise.

Source

Lines 521-524 in include/flecs/addons/cpp/entity_view.hpp.

template <typename T>
bool owns() const {
    return owns(_::cpp_type<T>::id(m_world));
}

Synopsis

#include <include/flecs/addons/cpp/entity_view.hpp>

template <typename First, typename Second>
bool owns() const

Description

Check if entity owns the provided pair. An pair is owned if it is not shared from a base entity.

Template Parameters

First - The first element of the pair.

Second - The second element of the pair.

Returns
True if the entity owns the provided pair, false otherwise.

Source

Lines 533-538 in include/flecs/addons/cpp/entity_view.hpp.

template <typename First, typename Second>
bool owns() const {
    return owns(
        _::cpp_type<First>::id(m_world),
        _::cpp_type<Second>::id(m_world));
}