Function add

Synopsis

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

template <typename T>
void add() const

Description

Add singleton component.

Source

Lines 108-112 in include/flecs/addons/cpp/impl/world.hpp. Line 564 in include/flecs/addons/cpp/world.hpp.

template <typename T>
void world::add() const {
    flecs::entity e(m_world, _::cpp_type<T>::id(m_world));
    e.add<T>();
}