Function is_a

Summary

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

(1) Self & is_a(entity_t second)

(2) template <typename T>
    Self & is_a()

Function overload

Synopsis

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

Self & is_a(entity_t second)

Description

Shortcut for add(IsA, entity).

Parameters

second - The second element of the pair.

Mentioned in

Source

Lines 186-188 in include/flecs/addons/cpp/mixins/entity/builder.hpp.

Self& is_a(entity_t second) {
    return this->add(flecs::IsA, second);
}

Synopsis

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

template <typename T>
Self & is_a()

Description

Shortcut for add(IsA, entity).

Template Parameters

T - the type associated with the entity.

Mentioned in

Source

Lines 194-197 in include/flecs/addons/cpp/mixins/entity/builder.hpp.

template <typename T>
Self& is_a() {
    return this->add(flecs::IsA, _::cpp_type<T>::id(this->m_world));
}