FCT
载入中...
搜索中...
未找到
FCT::IEventSystem< Config > 模板类 参考

#include <IEventSystem.h>

FCT::IEventSystem< Config > 的协作图:
Collaboration graph

struct  EventHandler
struct  EventIdentifierHandler
struct  IEventHandler
struct  IEventIdentifierHandler
struct  QueuedEvent

Public 成员函数

template<typename Event>
requires (Config::EnableTrigger && Config::EventAsData)
void trigger (const Event &event)
template<typename Event>
requires (Config::EnableTrigger && !Config::EventAsData)
void trigger ()
template<typename Event>
requires (Config::EnableQueue && Config::EventAsData)
void enqueue (Event &&event)
template<typename Event>
requires (Config::EnableQueue && !Config::EventAsData)
void enqueue ()
template<typename Event>
requires Config::EnableQueue
void update ()
void updateAll ()
template<typename Event, typename Func>
requires Config::EventAsData
SubscribeId subscribe (Func &&func)
template<typename Event, typename Func>
requires (!Config::EventAsData)
SubscribeId subscribe (Func &&func)
template<typename Event>
void unsubscribe (SubscribeId subscribeId)
template<typename Event>
void unsubscribeAll ()
void unsubscribe (SubscribeId subscribeId)

静态 Private 成员函数

template<typename Event>
static constexpr auto getEventTypeId ()

Private 属性

std::conditional_t< Config::EventAsData, std::unordered_map< entt::id_type, std::unordered_map< SubscribeId, std::unique_ptr< IEventHandler > > >, std::unordered_map< entt::id_type, std::unordered_map< SubscribeId, std::unique_ptr< IEventIdentifierHandler > > > > m_handlers
std::conditional_t< Config::EnableQueue, std::unordered_map< entt::id_type, std::vector< std::function< void()> > >, std::monostate > m_eventQueue
SubscribeId m_nextSubscribeId = 1

详细描述

template<typename Config = EventSystemConfig::Full>
class FCT::IEventSystem< Config >

在文件 IEventSystem.h46 行定义.

成员函数说明

◆ enqueue() [1/2]

template<typename Config = EventSystemConfig::Full>
template<typename Event>
requires (Config::EnableQueue && !Config::EventAsData)
void FCT::IEventSystem< Config >::enqueue ( )
inline

在文件 IEventSystem.h151 行定义.

◆ enqueue() [2/2]

template<typename Config = EventSystemConfig::Full>
template<typename Event>
requires (Config::EnableQueue && Config::EventAsData)
void FCT::IEventSystem< Config >::enqueue ( Event && event)
inline

在文件 IEventSystem.h138 行定义.

◆ getEventTypeId()

template<typename Config = EventSystemConfig::Full>
template<typename Event>
constexpr auto FCT::IEventSystem< Config >::getEventTypeId ( )
inlinestaticconstexprprivate

在文件 IEventSystem.h49 行定义.

这是这个函数的调用关系图:

◆ subscribe() [1/2]

template<typename Config = EventSystemConfig::Full>
template<typename Event, typename Func>
requires Config::EventAsData
SubscribeId FCT::IEventSystem< Config >::subscribe ( Func && func)
inline

在文件 IEventSystem.h192 行定义.

这是这个函数的调用关系图:

◆ subscribe() [2/2]

template<typename Config = EventSystemConfig::Full>
template<typename Event, typename Func>
requires (!Config::EventAsData)
SubscribeId FCT::IEventSystem< Config >::subscribe ( Func && func)
inline

在文件 IEventSystem.h208 行定义.

◆ trigger() [1/2]

template<typename Config = EventSystemConfig::Full>
template<typename Event>
requires (Config::EnableTrigger && !Config::EventAsData)
void FCT::IEventSystem< Config >::trigger ( )
inline

在文件 IEventSystem.h124 行定义.

这是这个函数的调用关系图:

◆ trigger() [2/2]

template<typename Config = EventSystemConfig::Full>
template<typename Event>
requires (Config::EnableTrigger && Config::EventAsData)
void FCT::IEventSystem< Config >::trigger ( const Event & event)
inline

在文件 IEventSystem.h110 行定义.

◆ unsubscribe() [1/2]

template<typename Config = EventSystemConfig::Full>
template<typename Event>
void FCT::IEventSystem< Config >::unsubscribe ( SubscribeId subscribeId)
inline

在文件 IEventSystem.h226 行定义.

这是这个函数的调用关系图:

◆ unsubscribe() [2/2]

template<typename Config = EventSystemConfig::Full>
void FCT::IEventSystem< Config >::unsubscribe ( SubscribeId subscribeId)
inline

在文件 IEventSystem.h244 行定义.

◆ unsubscribeAll()

template<typename Config = EventSystemConfig::Full>
template<typename Event>
void FCT::IEventSystem< Config >::unsubscribeAll ( )
inline

在文件 IEventSystem.h239 行定义.

◆ update()

template<typename Config = EventSystemConfig::Full>
template<typename Event>
requires Config::EnableQueue
void FCT::IEventSystem< Config >::update ( )
inline

在文件 IEventSystem.h165 行定义.

◆ updateAll()

template<typename Config = EventSystemConfig::Full>
void FCT::IEventSystem< Config >::updateAll ( )
inline

在文件 IEventSystem.h180 行定义.

类成员变量说明

◆ m_eventQueue

template<typename Config = EventSystemConfig::Full>
std::conditional_t<Config::EnableQueue, std::unordered_map<entt::id_type, std::vector<std::function<void()> > >, std::monostate> FCT::IEventSystem< Config >::m_eventQueue
private

在文件 IEventSystem.h104 行定义.

◆ m_handlers

template<typename Config = EventSystemConfig::Full>
std::conditional_t<Config::EventAsData, std::unordered_map<entt::id_type, std::unordered_map<SubscribeId, std::unique_ptr<IEventHandler> > >, std::unordered_map<entt::id_type, std::unordered_map<SubscribeId, std::unique_ptr<IEventIdentifierHandler> > > > FCT::IEventSystem< Config >::m_handlers
private

在文件 IEventSystem.h100 行定义.

◆ m_nextSubscribeId

template<typename Config = EventSystemConfig::Full>
SubscribeId FCT::IEventSystem< Config >::m_nextSubscribeId = 1
private

在文件 IEventSystem.h106 行定义.


该类的文档由以下文件生成: