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

CBufList Class Reference

#include <tcpapp.h>

Collaboration diagram for CBufList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CBufList ()
 ~CBufList ()
void insert (CBuf *cbuf)
CBufdetach ()

Protected Attributes

CBufhead_
CBuftail_

Constructor & Destructor Documentation

CBufList::CBufList  )  [inline]
 

Definition at line 66 of file tcpapp.h.

References head_, and tail_.

00066 : head_(NULL), tail_(NULL) {}

CBufList::~CBufList  ) 
 

Definition at line 43 of file tcpapp.cc.

References head_, CBuf::next_, and tail_.

00044 {
00045         while (head_ != NULL) {
00046                 tail_ = head_;
00047                 head_ = head_->next_;
00048                 delete tail_;
00049         }
00050 }


Member Function Documentation

CBuf * CBufList::detach  ) 
 

Definition at line 65 of file tcpapp.cc.

References head_, CBuf::next_, and tail_.

Referenced by TcpApp::rcvr_retrieve_data().

00066 {
00067         if (head_ == NULL)
00068                 return NULL;
00069         CBuf *p = head_;
00070         if ((head_ = head_->next_) == NULL)
00071                 tail_ = NULL;
00072 #ifdef TCPAPP_DEBUG
00073         num_--;
00074 #endif
00075         return p;
00076 }

void CBufList::insert CBuf cbuf  ) 
 

Definition at line 52 of file tcpapp.cc.

References head_, CBuf::next_, and tail_.

Referenced by TcpApp::send().

00053 {
00054         if (tail_ == NULL) 
00055                 head_ = tail_ = cbuf;
00056         else {
00057                 tail_->next_ = cbuf;
00058                 tail_ = cbuf;
00059         }
00060 #ifdef TCPAPP_DEBUG
00061         num_++;
00062 #endif
00063 }


Member Data Documentation

CBuf* CBufList::head_ [protected]
 

Definition at line 74 of file tcpapp.h.

Referenced by CBufList(), detach(), insert(), and ~CBufList().

CBuf* CBufList::tail_ [protected]
 

Definition at line 75 of file tcpapp.h.

Referenced by CBufList(), detach(), insert(), and ~CBufList().


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