pcce::EventConnectionManager Class Reference

#include <EventConnectionManager.h>

List of all members.

Public Member Functions

 ~EventConnectionManager ()
void AddHandler (const tHashValue eventType, tEventHandler handler)
void RemoveHandler (const tHashValue eventType)
void AddConnection (const tHashValue eventType, tEventConnection connection)

Private Types

typedef std::map< const
tHashValue, tEventConnection
tEventConnectionMap
typedef std::pair< const
tHashValue, tEventConnection
tEventConnectionMapPair

Private Attributes

tEventConnectionMap mMap


Detailed Description

Definition at line 43 of file EventConnectionManager.h.


Member Typedef Documentation

Definition at line 53 of file EventConnectionManager.h.

Definition at line 54 of file EventConnectionManager.h.


Constructor & Destructor Documentation

EventConnectionManager::~EventConnectionManager (  ) 

Definition at line 39 of file EventConnectionManager.cpp.

References mMap.

00039                                                 {
00040   for (tEventConnectionMap::const_iterator i =  mMap.begin(); i != mMap.end(); ++i) {
00041     i->second.disconnect();
00042   }
00043 }


Member Function Documentation

void EventConnectionManager::AddHandler ( const tHashValue  eventType,
tEventHandler  handler 
)

Definition at line 45 of file EventConnectionManager.cpp.

References pcce::Singleton< T >::Get(), mMap, and PCCE_CHECK.

Referenced by pcce::RenderSubSystem::vInitialize(), and pcce::InputSubSystem::vInitialize().

00045                                                                                          {
00046   tEventConnectionMap::iterator i =  mMap.find(eventType);
00047   PCCE_CHECK(
00048     i == mMap.end(), "EventConnectionManager::AddHandler: Already registered for event type");
00049   tEventConnection connection = EventSystemSingleton::Get()->AddHandler(eventType, handler);
00050   mMap.insert(i, tEventConnectionMapPair(eventType, connection));
00051 }

void EventConnectionManager::RemoveHandler ( const tHashValue  eventType  ) 

Definition at line 53 of file EventConnectionManager.cpp.

References mMap.

Referenced by pcce::RenderSubSystem::vShutdown().

00053                                                                      {
00054   tEventConnectionMap::iterator i =  mMap.find(eventType);
00055   if (i != mMap.end()) {
00056     i->second.disconnect();
00057     mMap.erase(i);
00058   }
00059 }

void EventConnectionManager::AddConnection ( const tHashValue  eventType,
tEventConnection  connection 
)

Definition at line 61 of file EventConnectionManager.cpp.

References mMap, and PCCE_CHECK.

00061                                                                                                   {
00062   tEventConnectionMap::iterator i =  mMap.find(eventType);
00063   PCCE_CHECK(
00064     i == mMap.end(), "EventConnectionManager::AddConnection: Already registered for event type");
00065   mMap.insert(i, tEventConnectionMapPair(eventType, connection));
00066 }


Member Data Documentation


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

Generated on Thu Mar 6 11:39:27 2008 for Protocce by  doxygen 1.5.5