|
reSIProcate/stack
9694
|
#include <TransactionMap.hxx>
Classes | |
| class | BranchCompare |
Public Member Functions | |
| ~TransactionMap () | |
| TransactionState * | find (const Data &transactionId) const |
| void | add (const Data &transactionId, TransactionState *state) |
| void | erase (const Data &transactionId) |
| int | size () const |
Private Types | |
| typedef std::map< Data, TransactionState *, BranchCompare > | Map |
| typedef Map::iterator | MapIterator |
| typedef Map::const_iterator | MapConstIterator |
Private Attributes | |
| Map | mMap |
Definition at line 14 of file TransactionMap.hxx.
typedef std::map<Data, TransactionState*, BranchCompare> resip::TransactionMap::Map [private] |
Definition at line 91 of file TransactionMap.hxx.
typedef Map::const_iterator resip::TransactionMap::MapConstIterator [private] |
Definition at line 96 of file TransactionMap.hxx.
typedef Map::iterator resip::TransactionMap::MapIterator [private] |
Definition at line 95 of file TransactionMap.hxx.
| TransactionMap::~TransactionMap | ( | ) |
Definition at line 13 of file TransactionMap.cxx.
| void TransactionMap::add | ( | const Data & | transactionId, |
| TransactionState * | state | ||
| ) |
Definition at line 38 of file TransactionMap.cxx.
References mMap.
Referenced by resip::TransactionState::add().
{
MapIterator i = mMap.find(tid);
if (i != mMap.end())
{
if (i->second != state)
{
// .bwc. ~TransactionState will remove itself from the map.
delete i->second;
//DebugLog (<< "Replacing TMAP[" << tid << "] = " << state << " : " << *state);
mMap[tid] = state;
}
}
else
{
//DebugLog (<< "Inserting TMAP[" << tid << "] = " << state << " : " << *state);
mMap[tid] = state;
}
}
| void TransactionMap::erase | ( | const Data & | transactionId | ) |
Definition at line 59 of file TransactionMap.cxx.
Referenced by resip::TransactionState::erase().
{
MapIterator i = mMap.find(tid);
if (i != mMap.end())
{
// don't delete it here, the TransactionState deletes itself and removes
// itself from the map
//DebugLog (<< "Erasing " << tid << "(" << i->second << ")");
mMap.erase(i);
}
else
{
InfoLog (<< "Couldn't find " << tid << " to remove");
assert(0);
}
}
| TransactionState * TransactionMap::find | ( | const Data & | transactionId | ) | const |
Definition at line 24 of file TransactionMap.cxx.
References mMap.
Referenced by resip::TransactionState::process(), resip::TransactionState::processSipMessageAsNew(), and resip::TransactionState::processTimer().
{
MapConstIterator i = mMap.find(tid);
if (i != mMap.end())
{
return i->second;
}
else
{
return 0;
}
}
| int TransactionMap::size | ( | ) | const |
Definition at line 77 of file TransactionMap.cxx.
References mMap.
Referenced by resip::SipStack::dump(), resip::TransactionController::getNumClientTransactions(), resip::TransactionController::getNumServerTransactions(), and resip::TransactionController::~TransactionController().
{
return (int)mMap.size();
}
Map resip::TransactionMap::mMap [private] |
Definition at line 94 of file TransactionMap.hxx.
Referenced by add(), erase(), find(), size(), and ~TransactionMap().
1.7.5.1