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

DoubleList Class Reference

#include <utilities.h>

Inheritance diagram for DoubleList:

Inheritance graph
[legend]
Collaboration diagram for DoubleList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DoubleList ()
virtual void destroy ()
DoubleListElemhead ()
DoubleListElemtail ()
void detach (DoubleListElem *e)
void insert (DoubleListElem *src, DoubleListElem *dst)
void append (DoubleListElem *src, DoubleListElem *dst)

Protected Attributes

DoubleListElemhead_
DoubleListElemtail_

Constructor & Destructor Documentation

DoubleList::DoubleList  )  [inline]
 

Definition at line 94 of file utilities.h.

References head_, and tail_.

00094 : head_(0), tail_(0) {}


Member Function Documentation

void DoubleList::append DoubleListElem src,
DoubleListElem dst
[inline]
 

Definition at line 111 of file utilities.h.

References DoubleListElem::append(), and tail_.

Referenced by MediaSegmentList::add(), HitCountList::add(), and HitCountList::update().

00111                                                               {
00112                 dst->append(src);
00113                 if (dst == tail_)
00114                         tail_ = src;
00115         }

Here is the call graph for this function:

void DoubleList::destroy  )  [virtual]
 

Reimplemented in MediaSegmentList.

Definition at line 81 of file utilities.cc.

References head_, DoubleListElem::next(), and tail_.

Referenced by MediaSegmentList::destroy().

00082 {
00083         DoubleListElem *p = head_, *q;
00084         while (p != NULL) {
00085                 q = p;
00086                 p = p->next();
00087                 delete q;
00088         }
00089         head_ = tail_ = NULL;
00090 }

Here is the call graph for this function:

void DoubleList::detach DoubleListElem e  )  [inline]
 

Definition at line 99 of file utilities.h.

References DoubleListElem::detach(), head_, DoubleListElem::next(), DoubleListElem::prev(), and tail_.

Referenced by MediaSegmentList::evict_head(), MediaSegmentList::evict_head_offset(), MediaSegmentList::evict_tail(), MClientPagePool::force_remove(), MediaSegmentList::merge_seg(), MClientPagePool::repl_atomic(), MClientPagePool::repl_finegrain(), and HitCountList::update().

00099                                        {
00100                 if (head_ == e)
00101                         head_ = e->next();
00102                 if (tail_ == e)
00103                         tail_ = e->prev();
00104                 e->detach();
00105         }

Here is the call graph for this function:

DoubleListElem* DoubleList::head  )  [inline]
 

Definition at line 96 of file utilities.h.

References head_.

00096 { return head_; }

void DoubleList::insert DoubleListElem src,
DoubleListElem dst
[inline]
 

Definition at line 106 of file utilities.h.

References head_, and DoubleListElem::insert().

Referenced by MediaSegmentList::add(), HitCountList::add(), and HitCountList::update().

00106                                                               {
00107                 dst->insert(src);
00108                 if (dst == head_)
00109                         head_ = src;
00110         }

Here is the call graph for this function:

DoubleListElem* DoubleList::tail  )  [inline]
 

Definition at line 97 of file utilities.h.

References tail_.

Referenced by MClientPagePool::repl_atomic(), and MClientPagePool::repl_finegrain().

00097 { return tail_; }


Member Data Documentation

DoubleListElem* DoubleList::head_ [protected]
 

Definition at line 117 of file utilities.h.

Referenced by MediaSegmentList::add(), HitCountList::add(), MediaSegmentList::check_holes(), MediaSegmentList::check_integrity(), HitCountList::check_integrity(), destroy(), detach(), DoubleList(), MediaSegmentList::dump2buf(), MediaSegmentList::evict_head(), MediaSegmentList::evict_head_offset(), MediaSegmentList::get_nextseg(), MediaSegmentList::getsize(), head(), MediaSegmentList::in(), insert(), MediaSegmentList::overlap_size(), MediaSegmentList::print(), HitCountList::print(), and HitCountList::update().

DoubleListElem * DoubleList::tail_ [protected]
 

Definition at line 117 of file utilities.h.

Referenced by MediaSegmentList::add(), HitCountList::add(), append(), destroy(), detach(), HitCountList::detach_tail(), DoubleList(), MediaSegmentList::evict_head_offset(), MediaSegmentList::evict_tail(), MediaSegmentList::merge_seg(), tail(), and HitCountList::update().


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