载入中...
搜索中...
未找到
eve::cap 命名空间参考

命名空间

namespace  detail
 

函数

template<class I >
void provide (I *impl)
 
template<class I >
I * query ()
 
template<class I >
void revoke (I *impl)
 
template<class I >
void addListener (I *impl, int priority=0)
 
template<class I >
void removeListener (I *impl)
 
template<class I >
size_t listenerCount ()
 
template<class I >
IlistenerAt (size_t index)
 
template<class I , class F >
void forEach (F &&fn)
 
template<class I , class F >
bool forEachUntil (F &&fn)
 

函数说明

◆ addListener()

template<class I >
void eve::cap::addListener ( I impl,
int  priority = 0 
)

Add one of possibly many implementations. Lower priority runs first.

在文件 Capability.h89 行定义.

引用了 eve::cap::detail::addListenerRaw(), impl , 以及 priority.

◆ forEach()

template<class I , class F >
void eve::cap::forEach ( F &&  fn)

Call fn for every implementation of I in priority order. Iterating by index keeps this valid if a listener registers or withdraws another during dispatch.

在文件 Capability.h114 行定义.

引用了 fn, impl, eve::cap::detail::listenerAtRaw(), eve::cap::detail::listenerCountRaw(), n , 以及 query().

◆ forEachUntil()

template<class I , class F >
bool eve::cap::forEachUntil ( F &&  fn)

Call fn for each implementation of I until one returns true; returns whether any did. Used where the first handler that recognises an item wins.

在文件 Capability.h126 行定义.

引用了 fn, impl, eve::cap::detail::listenerAtRaw(), eve::cap::detail::listenerCountRaw(), n , 以及 query().

◆ listenerAt()

template<class I >
I * eve::cap::listenerAt ( size_t  index)

在文件 Capability.h104 行定义.

引用了 eve::cap::detail::listenerAtRaw() , 以及 query().

◆ listenerCount()

template<class I >
size_t eve::cap::listenerCount ( )

在文件 Capability.h99 行定义.

引用了 eve::cap::detail::listenerCountRaw().

◆ provide()

template<class I >
void eve::cap::provide ( I impl)

Register the single implementation of I, replacing any previous one.

在文件 Capability.h71 行定义.

引用了 impl , 以及 eve::cap::detail::provideRaw().

◆ query()

◆ removeListener()

template<class I >
void eve::cap::removeListener ( I impl)

在文件 Capability.h94 行定义.

引用了 impl , 以及 eve::cap::detail::removeListenerRaw().

◆ revoke()

template<class I >
void eve::cap::revoke ( I impl)

Withdraw impl; a no-op when something else has since taken the slot.

在文件 Capability.h83 行定义.

引用了 impl , 以及 eve::cap::detail::revokeRaw().