Logo Search packages:      
Sourcecode: poco version File versions  Download package

Poco::FIFOEvent< TArgs > Class Template Reference

#include <FIFOEvent.h>

Inheritance diagram for Poco::FIFOEvent< TArgs >:

Poco::AbstractEvent< TArgs, TStrategy, TDelegate >

List of all members.

Detailed Description

template<class TArgs>
class Poco::FIFOEvent< TArgs >

A FIFOEvent uses internally a FIFOStrategy which guarantees that delegates are invoked in the order they were added to the event.

Note that one object can only register one method to a FIFOEvent. Subsequent registrations will overwrite the existing delegate. For example: FIFOEvent<int> tmp; MyClass myObject; tmp += Delegate<MyClass, int>(&myObject, &MyClass::myMethod1); tmp += Delegate<MyClass, int>(&myObject, &MyClass::myMethod2);

The second registration will overwrite the first one.

Definition at line 53 of file FIFOEvent.h.

Public Member Functions

void clear ()
 Removes all delegates.
void disable ()
void enable ()
 Enables the event.
bool isEnabled () const
void notify (const void *pSender, TArgs &args)
ActiveResult< TArgs > notifyAsync (const void *pSender, const TArgs &args)
void operator() (const void *pSender, TArgs &args)
void operator+= (const TDelegate &aDelegate)
void operator-= (const TDelegate &aDelegate)

Protected Member Functions

TArgs executeAsyncImpl (const NotifyAsyncParams &par)

Protected Attributes

bool _enabled
 The strategy used to notify observers.
ActiveMethod< TArgs,
FastMutex _mutex
TStrategy _strategy

Private Member Functions

 FIFOEvent (const FIFOEvent &e)
FIFOEventoperator= (const FIFOEvent &e)

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

Generated by  Doxygen 1.6.0   Back to index