event.h File Reference

Detailed Description

Interface for Event subsystem.

Definition in file event.h.

#include <hn/osdep.h>
#include <hn/bind_placeholders.h>
#include <hn/eventbase.h>
#include <hn/gettickcount.h>
#include <hn/log.h>
#include <hn/utils.h>
#include <boost/signal.hpp>
#include <boost/signals/trackable.hpp>
#include <boost/signals/connection.hpp>
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/type_traits.hpp>
#include <boost/thread.hpp>
#include <map>
#include <set>

Include dependency graph for event.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define DECLARE_EVENT_TABLE(Source, Event)
 Use this macro to define an event table for a specific object.
#define IMPLEMENT_EVENT_TABLE(SourceClass, Source, Event)

Define Documentation

Event   ) 


static EventTable<Source, Event>& getEventTable();                 \
        friend struct EventTable<Source, Event >::Deleter<                 \
                Source, boost::is_pointer< Source >::value                 \
Use this macro to define an event table for a specific object.

This generates a static member function getEventTable(), which can be used to get access to the event table.

Source Event source type. This must be a fully qualified type, for usage within EventTables. Example: SocketClient*
Event Event emitted from the source. Example: SocketEvent
This design was chosen because alternative approaches which would not couple the event table with the event source causes problems with win32 dynamic loader and linker and thus could not be used.

Friend declaration is needed for checkDelete() to work with private destructors.

Definition at line 608 of file event.h.

#define IMPLEMENT_EVENT_TABLE SourceClass,
Event   ) 


EventTable<Source, Event>& SourceClass::getEventTable() {          \
                static EventTable<Source, Event> s_evtT;                   \
                return s_evtT;                                             \
        } class SourceClass

Definition at line 614 of file event.h.