Function clear

Summary

#include <src/entt/signal/dispatcher.hpp>

(1) template <typename Event>
    void clear(const id_type id=type_hash< Event >::value())

(2) void clear()

Function overload

Synopsis

#include <src/entt/signal/dispatcher.hpp>

template <typename Event>
void clear(const id_type id=type_hash< Event >::value())

Description

Discards all the events stored so far in a given queue.

Template Parameters

Event - Type of event to discard.

Parameters

id - Name used to map the event queue within the dispatcher.

Source

Lines 355-358 in src/entt/signal/dispatcher.hpp.

template<typename Event>
void clear(const id_type id = type_hash<Event>::value()) {
    assure<Event>(id).clear();
}

Synopsis

#include <src/entt/signal/dispatcher.hpp>

void clear()

Description

Discards all the events queued so far.

Source

Lines 361-365 in src/entt/signal/dispatcher.hpp.

void clear() ENTT_NOEXCEPT {
    for(auto &&cpool: pools.first()) {
        cpool.second->clear();
    }
}





Add Discussion

Log in to comment