Kea  1.9.9-git
isc::util::CSCallbackPairList Class Reference

Maintains list of unique CSCallbackPairs. More...

#include <multi_threading_mgr.h>

Public Member Functions

 CSCallbackPairList ()
 Constructor. More...
 
void addCallbackPair (const std::string &name, const CSCallbackPair::Callback &entry_cb, const CSCallbackPair::Callback &exit_cb)
 Adds a callback pair to the list. More...
 
const std::list< CSCallbackPair > & getCallbackPairs ()
 Fetches the list of callback pairs. More...
 
void removeAll ()
 Removes all callbacks from the list. More...
 
void removeCallbackPair (const std::string &name)
 Removes a callback pair from the list. More...
 

Detailed Description

Maintains list of unique CSCallbackPairs.

The list emphasizes iteration order and speed over retrieval by name. When iterating over the list of callback pairs, they are returned in the order they were added, not by name.

Definition at line 58 of file multi_threading_mgr.h.

Constructor & Destructor Documentation

isc::util::CSCallbackPairList::CSCallbackPairList ( )
inline

Constructor.

Definition at line 61 of file multi_threading_mgr.h.

Member Function Documentation

void isc::util::CSCallbackPairList::addCallbackPair ( const std::string &  name,
const CSCallbackPair::Callback entry_cb,
const CSCallbackPair::Callback exit_cb 
)

Adds a callback pair to the list.

Parameters
nameName of the callback to add.
entry_cbCallback to add.
exit_cbCallback to add.
Exceptions
BadValueif the name is already in the list, the name is blank, or either callback is empty.

Definition at line 185 of file multi_threading_mgr.cc.

References isc_throw.

Referenced by isc::util::MultiThreadingMgr::addCriticalSectionCallbacks().

const std::list< CSCallbackPair > & isc::util::CSCallbackPairList::getCallbackPairs ( )

Fetches the list of callback pairs.

Definition at line 228 of file multi_threading_mgr.cc.

void isc::util::CSCallbackPairList::removeAll ( )

Removes all callbacks from the list.

Definition at line 223 of file multi_threading_mgr.cc.

Referenced by isc::util::MultiThreadingMgr::removeAllCriticalSectionCallbacks().

void isc::util::CSCallbackPairList::removeCallbackPair ( const std::string &  name)

Removes a callback pair from the list.

Parameters
nameName of the callback to remove. If no such callback exists, it simply returns.

Definition at line 213 of file multi_threading_mgr.cc.

Referenced by isc::util::MultiThreadingMgr::removeCriticalSectionCallbacks().


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