Function child_of

Summary

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

(1) Self & child_of(entity_t second)

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

Function overload

Synopsis

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

Self & child_of(entity_t second)

Description

Shortcut for add(ChildOf, entity).

Parameters

second - The second element of the pair.

Mentioned in

Source

Lines 203-205 in include/flecs/addons/cpp/mixins/entity/builder.hpp.

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

Synopsis

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

template <typename T>
Self & child_of()

Description

Shortcut for add(ChildOf, entity).

Template Parameters

T - the type associated with the entity.

Mentioned in

Source

Lines 237-240 in include/flecs/addons/cpp/mixins/entity/builder.hpp.

template <typename T>
Self& child_of() {
    return this->child_of(_::cpp_type<T>::id(this->m_world));
}