CBuf Class Reference

#include <tcpapp.h>

Collaboration diagram for CBuf:

Collaboration graph
[legend]

Detailed Description

Definition at line 55 of file tcpapp.h.

Public Member Functions

int bytes ()
 CBuf (AppData *c, int nbytes)
AppDatadata ()
int size ()
 ~CBuf ()

Protected Attributes

AppDatadata_
int nbytes_
CBufnext_
int size_

Friends

class CBufList


Constructor & Destructor Documentation

CBuf::CBuf AppData c,
int  nbytes
 

Definition at line 57 of file tcpapp.cc.

References data_, nbytes_, next_, AppData::size(), and size_.

00058 {
00059     nbytes_ = nbytes;
00060     size_ = c->size();
00061     if (size_ > 0) 
00062         data_ = c;
00063     else 
00064         data_ = NULL;
00065     next_ = NULL;
00066 }

Here is the call graph for this function:

CBuf::~CBuf  )  [inline]
 

Definition at line 58 of file tcpapp.h.

References data_.

00058             {
00059         if (data_ != NULL)
00060             delete data_;
00061     }


Member Function Documentation

int CBuf::bytes  )  [inline]
 

Definition at line 64 of file tcpapp.h.

References nbytes_.

Referenced by TcpApp::recv().

00064 { return nbytes_; }

AppData* CBuf::data  )  [inline]
 

Definition at line 62 of file tcpapp.h.

References data_.

Referenced by TcpApp::recv().

00062 { return data_; }

int CBuf::size  )  [inline]
 

Definition at line 63 of file tcpapp.h.

References size_.

Referenced by TcpApp::recv().

00063 { return size_; }


Friends And Related Function Documentation

friend class CBufList [friend]
 

Definition at line 72 of file tcpapp.h.


Field Documentation

AppData* CBuf::data_ [protected]
 

Definition at line 73 of file tcpapp.h.

Referenced by CBuf(), data(), and ~CBuf().

int CBuf::nbytes_ [protected]
 

Definition at line 75 of file tcpapp.h.

Referenced by bytes(), and CBuf().

CBuf* CBuf::next_ [protected]
 

Definition at line 76 of file tcpapp.h.

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

int CBuf::size_ [protected]
 

Definition at line 74 of file tcpapp.h.

Referenced by CBuf(), and size().


The documentation for this class was generated from the following files:
Generated on Tue Mar 6 17:04:19 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6