ConnectionList Class Reference

#include <connlist.h>

Collaboration diagram for ConnectionList:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ConnectionList (void)
 ~ConnectionList (void)
void add (const Connection *)
void remove (const Connection *)
template<class Func>
void mutexed_for_each (const Func &f)

Private Attributes

std::list< Connection * > list
pthread_mutex_t mutex


Detailed Description

This class is simply a mutex-protected list of Connections used by both MasterController and the BiDirConn classes as a list of things it needs to manage and/or interact with.

Definition at line 60 of file connlist.h.


Constructor & Destructor Documentation

ConnectionList::ConnectionList ( void   ) 

Definition at line 47 of file connlist.cc.

References mutex, and PTHREAD_CHECK_AND_THROW.

ConnectionList::~ConnectionList ( void   ) 

Definition at line 56 of file connlist.cc.

References mutex, and PTHREAD_CHECK_AND_THROW.


Member Function Documentation

void ConnectionList::add ( const Connection conn  ) 

Definition at line 66 of file connlist.cc.

References list, mutex, and PTHREAD_CHECK_AND_THROW.

void ConnectionList::remove ( const Connection conn  ) 

Definition at line 82 of file connlist.cc.

References list, mutex, and PTHREAD_CHECK_AND_THROW.

template<class Func>
void ConnectionList::mutexed_for_each ( const Func &  f  )  [inline]

Note:
This member template of the ConnectionList class is defined here because GCC (at least as of 4.1.x) fails to automatically instantiate it correctly when it's defined in outlet.cc. This might be able to be moved later.

Definition at line 83 of file connlist.h.

References Outlet::get_id(), list, mutex, and PTHREAD_CHECK_AND_THROW.

Here is the call graph for this function:


Member Data Documentation

std::list<Connection*> ConnectionList::list [private]

Definition at line 73 of file connlist.h.

Referenced by add(), mutexed_for_each(), and remove().

pthread_mutex_t ConnectionList::mutex [private]

Definition at line 74 of file connlist.h.

Referenced by add(), ConnectionList(), mutexed_for_each(), remove(), and ~ConnectionList().


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

Generated on Tue May 13 11:32:45 2008 for consmgr by  doxygen 1.5.5