Honeycomb  0.1
Component-Model Framework
Public Types | Public Member Functions | Static Public Member Functions | List of all members
honey::ListenerQueue Class Reference

Listener that holds queued slot for delayed processing of signals. More...

#include <ListenerQueue.h>

Inheritance diagram for honey::ListenerQueue:
Inheritance graph
[legend]
Collaboration diagram for honey::ListenerQueue:
Collaboration graph
[legend]

Public Types

typedef SharedPtr< ListenerQueuePtr
 
typedef SharedPtr< const ListenerQueueConstPtr
 
- Public Types inherited from honey::Listener
typedef SharedPtr< ListenerPtr
 
typedef SharedPtr< const ListenerConstPtr
 
- 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 ()
 
SlotBaseslot () const
 Get slot. More...
 
const void * obj () const
 Get object instance for listener identification. More...
 
const Idid () 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 ListenerQueuecreate (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 Listenercreate (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
 

Detailed Description

Listener that holds queued slot for delayed processing of signals.

Signal args must be default constructible and assignable.

Member Typedef Documentation

Member Function Documentation

void honey::ListenerQueue::clear ( )
inline

Remove all signals stored in queue.

template<class Signal , class F >
static ListenerQueue& honey::ListenerQueue::create ( F &&  f,
const void *  obj = nullptr,
const Id id = idnull 
)
inlinestatic

Construct with slot to receive Signal using function F. The object instance and id are used together to identify this listener.

void honey::ListenerQueue::process ( )
inline

Dispatch all signals stored in queue, clears queue when done.


The documentation for this class was generated from the following file: