Function id

Summary

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

(1) template <typename T>
    Base & id()

(2) template <typename First, typename Second>
    Base & id()

(3) template <typename First>
    Base & id(entity_t second)

(4) Base & id(entity_t first, entity_t second)

(5) Base & id(flecs::id_t id)

Function overload

Synopsis

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

template <typename T>
Base & id()

Description

Add component to emit for

Source

Lines 20-26 in include/flecs/addons/cpp/mixins/event/builder.hpp.

template <typename T>
Base& id() {
    m_ids.array = m_ids_array;
    m_ids.array[m_ids.count] = _::cpp_type<T>().id(m_world);
    m_ids.count ++;
    return *this;
}

Synopsis

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

template <typename First, typename Second>
Base & id()

Description

Add pair to emit for

Template Parameters

First - The first element of the pair.

Second - the second element of a pair.

Source

Lines 33-38 in include/flecs/addons/cpp/mixins/event/builder.hpp.

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

Synopsis

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

template <typename First>
Base & id(entity_t second)

Description

Add pair to emit for

Template Parameters

First - The first element of the pair.

Parameters

second - The second element of the pair id.

Source

Lines 45-48 in include/flecs/addons/cpp/mixins/event/builder.hpp.

template <typename First>
Base& id(entity_t second) {
    return id(ecs_pair(_::cpp_type<First>::id(this->m_world), second));
}

Synopsis

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

Base & id(entity_t first, entity_t second)

Description

Add pair to emit for

Parameters

first - The first element of the pair type.

second - The second element of the pair id.

Source

Lines 55-57 in include/flecs/addons/cpp/mixins/event/builder.hpp.

Base& id(entity_t first, entity_t second) {
    return id(ecs_pair(first, second));
}

Synopsis

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

Base & id(flecs::id_t id)

Description

Add (component) id to emit for

Source

Lines 60-65 in include/flecs/addons/cpp/mixins/event/builder.hpp.

Base& id(flecs::id_t id) {
    m_ids.array = m_ids_array;
    m_ids.array[m_ids.count] = id;
    m_ids.count ++;
    return *this;
}