Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

LsPaths Class Reference

#include <ls.h>

Inheritance diagram for LsPaths:

Inheritance graph
[legend]
Collaboration diagram for LsPaths:

Collaboration graph
[legend]
List of all members.

Public Types

typedef less< int > less_key
typedef map< int, LsEqualPaths,
less_key
baseMap
typedef map< int, LsEqualPaths,
less< int > >::iterator 
iterator
typedef pair< iterator, bool > pair_iterator_bool

Public Member Functions

 LsPaths ()
iterator begin ()
iterator end ()
int lookupCost (int destId)
LsNodeIdListlookupNextHopListPtr (int destId)
iterator insertPathNoChecking (int destId, int cost, int nextHop)
iterator insertPathNoChecking (const LsPath &path)
iterator insertPath (int destId, int cost, int nextHop)
iterator insertPath (const LsPath &path)
iterator insertNextHopList (int destId, int cost, const LsNodeIdList &nextHopList)
iterator insert (const int &key, const LsEqualPaths &item)
void eraseAll ()
LsEqualPathsfindPtr (intkey)

Member Typedef Documentation

typedef map<int , LsEqualPaths , less_key> LsMap< int , LsEqualPaths >::baseMap [inherited]
 

Definition at line 100 of file ls.h.

typedef map<int , LsEqualPaths , less<int > >::iterator LsMap< int , LsEqualPaths >::iterator [inherited]
 

Definition at line 104 of file ls.h.

Referenced by begin(), end(), insertPath(), and insertPathNoChecking().

typedef less<int > LsMap< int , LsEqualPaths >::less_key [inherited]
 

Definition at line 99 of file ls.h.

typedef pair<iterator, bool> LsMap< int , LsEqualPaths >::pair_iterator_bool [inherited]
 

Definition at line 105 of file ls.h.


Constructor & Destructor Documentation

LsPaths::LsPaths  )  [inline]
 

Definition at line 257 of file ls.h.

References LsEqualPathsMap.

00257 : LsEqualPathsMap() {}


Member Function Documentation

iterator LsPaths::begin  )  [inline]
 

Definition at line 260 of file ls.h.

References LsMap< int, LsEqualPaths >::iterator.

00260 { return LsEqualPathsMap::begin();}

iterator LsPaths::end  )  [inline]
 

Definition at line 261 of file ls.h.

References LsMap< int, LsEqualPaths >::iterator.

Referenced by LsPathsTentative::LsPathsTentative().

00261 { return LsEqualPathsMap::end();}

void LsMap< int , LsEqualPaths >::eraseAll  )  [inline, inherited]
 

Definition at line 112 of file ls.h.

00112 { erase(begin(), end()); }

LsEqualPaths * LsMap< int , LsEqualPaths >::findPtr int   key  )  [inline, inherited]
 

Definition at line 113 of file ls.h.

Referenced by LsRouting::lookup(), lookupCost(), and lookupNextHopListPtr().

00113                             {
00114                 iterator it = baseMap::find(key);
00115                 return (it == baseMap::end()) ? (T *)NULL : &((*it).second);
00116         }

iterator LsMap< int , LsEqualPaths >::insert const int &  key,
const LsEqualPaths item
[inline, inherited]
 

Definition at line 106 of file ls.h.

Referenced by insertPathNoChecking().

00106                                                          {
00107                 typename baseMap::value_type v(key, item);
00108                 pair_iterator_bool ib = baseMap::insert(v);
00109                 return ib.second ? ib.first : baseMap::end();
00110         }

iterator LsPaths::insertNextHopList int  destId,
int  cost,
const LsNodeIdList nextHopList
 

iterator LsPaths::insertPath const LsPath path  )  [inline]
 

Definition at line 295 of file ls.h.

References LsPath::cost, LsPath::destination, insertPath(), LsMap< int, LsEqualPaths >::iterator, and LsPath::nextHop.

00295                                                 {
00296                 return insertPath(path.destination, path.cost, path.nextHop);
00297         }

Here is the call graph for this function:

iterator LsPaths::insertPath int  destId,
int  cost,
int  nextHop
 

Referenced by insertPath().

iterator LsPaths::insertPathNoChecking const LsPath path  )  [inline]
 

Definition at line 289 of file ls.h.

References LsPath::cost, LsPath::destination, insertPathNoChecking(), LsMap< int, LsEqualPaths >::iterator, and LsPath::nextHop.

00289                                                             {
00290                 return insertPathNoChecking(path.destination, path.cost, 
00291                                             path.nextHop);
00292         }

Here is the call graph for this function:

iterator LsPaths::insertPathNoChecking int  destId,
int  cost,
int  nextHop
[inline]
 

Definition at line 282 of file ls.h.

References LsMap< int, LsEqualPaths >::insert(), and LsMap< int, LsEqualPaths >::iterator.

Referenced by insertPathNoChecking().

00282                                                                          {
00283                 LsEqualPaths ep(cost, nextHop);
00284                 iterator itr = insert(destId, ep);
00285                 return itr; // for clarity
00286         }     

Here is the call graph for this function:

int LsPaths::lookupCost int  destId  )  [inline]
 

Definition at line 265 of file ls.h.

References LsEqualPaths::cost, LsMap< int, LsEqualPaths >::findPtr(), and LS_MAX_COST.

00265                                    {
00266                 LsEqualPaths * pEP = findPtr (destId);
00267                 if ( pEP == NULL ) return LS_MAX_COST + 1;
00268                 // else
00269                 return pEP->cost;
00270         }

Here is the call graph for this function:

LsNodeIdList* LsPaths::lookupNextHopListPtr int  destId  )  [inline]
 

Definition at line 273 of file ls.h.

References LsMap< int, LsEqualPaths >::findPtr(), and LsEqualPaths::nextHopList.

00273                                                        {
00274                 LsEqualPaths* pEP = findPtr(destId);
00275                 if (pEP == NULL ) 
00276                         return (LsNodeIdList *) NULL;
00277                 // else
00278                 return &(pEP->nextHopList);
00279         }

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Tue Apr 20 12:56:55 2004 for NS2.26SourcesOriginal by doxygen 1.3.3