Skip to content
Flecs v4.1
delegate.hpp File Reference

Wrappers around C++ functions that provide callbacks for C APIs. More...

#include <utility>

Go to the source code of this file.

Classes

struct  flecs::_::component_binding_ctx
struct  flecs::_::field_ptr
struct  flecs::_::field_ptrs< Components >
struct  flecs::_::delegate
struct  flecs::_::each_field< T, Ref >
struct  flecs::_::each_delegate< Func, Components >
struct  flecs::_::validate_delegate< Func, T >
struct  flecs::_::find_delegate< Func, Components >
struct  flecs::_::run_delegate< Func >
struct  flecs::_::entity_observer_delegate< Func, Event >
struct  flecs::_::entity_with_delegate_impl< arg_list< Args... > >
struct  flecs::_::entity_with_delegate< Func, typename >
struct  flecs::_::each_normalize_args< arg_list< Args... >, Normalize >
struct  flecs::_::each_callback_args< ArgList, typename, Normalize >
 Extract the component argument list from an each-callback signature. More...
struct  flecs::_::each_callback_args< arg_list< First, Args... >, if_t< is_same< decay_t< First >, flecs::entity >::value >, Normalize >
struct  flecs::_::each_callback_args< arg_list< First, Second, Args... >, if_t< is_same< decay_t< First >, flecs::iter >::value >, Normalize >

Namespaces

namespace  flecs::_
 Int to enum.

Typedefs

template<typename Func, typename ... Args>
using flecs::delegate = _::each_delegate<typename std::decay<Func>::type, Args...>
 Delegate type for each callbacks.

Functions

template<typename Delegate, ecs_iter_action_t Action, bool Run, typename Desc, typename Func>
void flecs::_::set_callback (Desc &desc, Func &&func)
template<bool Run, typename Desc, typename Func, typename... Components>
void flecs::_::set_each_callback (Desc &desc, Func &&func, arg_list< Components... >)

Detailed Description

Wrappers around C++ functions that provide callbacks for C APIs.

Definition in file delegate.hpp.

Typedef Documentation

◆ delegate

template<typename Func, typename ... Args>
using flecs::delegate = _::each_delegate<typename std::decay<Func>::type, Args...>

Delegate type for each callbacks.

Experimental: allows using the each delegate for use cases outside of Flecs.

Template Parameters
FuncThe callback function type.
ArgsThe component argument types.

Definition at line 510 of file delegate.hpp.