Honeycomb
0.1
Component-Model Framework
|
Listener that holds queued slot for delayed processing of signals. More...
#include <ListenerQueue.h>
Public Types | |
typedef SharedPtr< ListenerQueue > | Ptr |
typedef SharedPtr< const ListenerQueue > | ConstPtr |
Public Types inherited from honey::Listener | |
typedef SharedPtr< Listener > | Ptr |
typedef SharedPtr< const Listener > | ConstPtr |
Public Types inherited from honey::AllocatorObject< Alloc > | |
template<class T > | |
using | Allocator = Alloc< T > |
Public Member Functions | |
void | process () |
Dispatch all signals stored in queue, clears queue when done. More... | |
void | clear () |
Remove all signals stored in queue. More... | |
Public Member Functions inherited from honey::Listener | |
virtual | ~Listener () |
SlotBase & | slot () const |
Get slot. More... | |
const void * | obj () const |
Get object instance for listener identification. More... | |
const Id & | id () const |
Get listener id. More... | |
Public Member Functions inherited from honey::SharedObj< Listener > | |
SharedObj (Alloc &&a=Alloc()) debug_if( | |
Construct with allocator that is called to deallocate this shared object when all references have been released. More... | |
Public Member Functions inherited from honey::AllocatorObject< Alloc > | |
void * | operator new (szt size) |
void * | operator new (szt, void *ptr) |
void * | operator new (szt size, const char *srcFile, int srcLine) |
void * | operator new[] (szt size) |
void * | operator new[] (szt, void *ptr) |
void * | operator new[] (szt size, const char *srcFile, int srcLine) |
void | operator delete (void *p) |
void | operator delete[] (void *p) |
Static Public Member Functions | |
template<class Signal , class F > | |
static ListenerQueue & | create (F &&f, const void *obj=nullptr, const Id &id=idnull) |
Construct with slot to receive Signal using function F . The object instance and id are used together to identify this listener. More... | |
Static Public Member Functions inherited from honey::Listener | |
template<class Signal , class F > | |
static Listener & | create (F &&f, const void *obj=nullptr, const Id &id=idnull) |
Construct with slot to receive Signal using function F . The object instance and id are used together to identify this listener. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from honey::Listener | |
Listener (SlotBase &slot, const void *obj, const Id &id) | |
Protected Member Functions inherited from honey::SharedObj< Listener > | |
void | finalize () |
Destroys object. Called when strong reference count reaches 0. May be overridden to prevent destruction. More... | |
Protected Attributes inherited from honey::Listener | |
UniquePtr< SlotBase > | _slot |
const void * | _obj |
Id | _id |
Listener that holds queued slot for delayed processing of signals.
Signal args must be default constructible and assignable.
typedef SharedPtr<const ListenerQueue> honey::ListenerQueue::ConstPtr |
|
inline |
Remove all signals stored in queue.
|
inlinestatic |
Construct with slot to receive Signal
using function F
. The object instance and id are used together to identify this listener.
|
inline |
Dispatch all signals stored in queue, clears queue when done.