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

HttpLeaveData Class Reference

#include <http-aux.h>

Inheritance diagram for HttpLeaveData:

Inheritance graph
[legend]
Collaboration diagram for HttpLeaveData:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 HttpLeaveData (int id, int n)
 HttpLeaveData (HttpLeaveData &d)
virtual ~HttpLeaveData ()
virtual int size () const
virtual int cost () const
virtual AppDatacopy ()
int num () const
void add (int i, int id)
int rec_id (int i)
int & id ()
AppDataType type () const

Private Member Functions

int * rec ()

Private Attributes

int num_
int * rec_

Constructor & Destructor Documentation

HttpLeaveData::HttpLeaveData int  id,
int  n
[inline]
 

Definition at line 366 of file http-aux.h.

References HTTP_LEAVE, num_, and rec_.

Referenced by copy().

00366                                      : HttpData(HTTP_LEAVE, id) {
00367                 num_ = n;
00368                 if (num_ > 0)
00369                         rec_ = new int[num_];
00370                 else
00371                         rec_ = NULL;
00372         }

HttpLeaveData::HttpLeaveData HttpLeaveData d  )  [inline]
 

Definition at line 373 of file http-aux.h.

References num_, and rec_.

00373                                         : HttpData(d) {
00374                 num_ = d.num_;
00375                 if (num_ > 0) {
00376                         rec_ = new int[num_];
00377                         memcpy(rec_, d.rec_, num_*sizeof(int));
00378                 } else
00379                         rec_ = NULL;
00380         }

virtual HttpLeaveData::~HttpLeaveData  )  [inline, virtual]
 

Definition at line 381 of file http-aux.h.

References rec_.

00381                                  { 
00382                 if (rec_ != NULL)
00383                         delete []rec_; 
00384         }


Member Function Documentation

void HttpLeaveData::add int  i,
int  id
[inline]
 

Definition at line 395 of file http-aux.h.

References rec().

Referenced by NeighborCache::pack_leave(), and HttpMInvalCache::recv_leave().

00395                                        {
00396                 rec()[i] = id;
00397         }

Here is the call graph for this function:

virtual AppData* HttpLeaveData::copy  )  [inline, virtual]
 

Reimplemented from HttpData.

Definition at line 390 of file http-aux.h.

References HttpLeaveData().

00390                                 {
00391                 return (new HttpLeaveData(*this));
00392         }

Here is the call graph for this function:

virtual int HttpLeaveData::cost  )  const [inline, virtual]
 

Reimplemented from HttpData.

Definition at line 389 of file http-aux.h.

References HTTPLEAVE_COST, and num_.

Referenced by HttpMInvalCache::send_leave().

00389 { return num_*HTTPLEAVE_COST; }

int& HttpData::id  )  [inline, inherited]
 

Definition at line 159 of file http-aux.h.

References HttpData::id_.

Referenced by HttpMInvalCache::process_data(), HttpMInvalCache::recv_inv(), and HttpMInvalCache::recv_leave().

00159 { return id_; }

int HttpLeaveData::num  )  const [inline]
 

Definition at line 394 of file http-aux.h.

References num_.

Referenced by HttpMInvalCache::recv_leave().

00394 { return num_; }

int* HttpLeaveData::rec  )  [inline, private]
 

Definition at line 364 of file http-aux.h.

References rec_.

Referenced by add(), and rec_id().

00364 { return rec_; }

int HttpLeaveData::rec_id int  i  )  [inline]
 

Definition at line 398 of file http-aux.h.

References rec().

Referenced by HttpMInvalCache::recv_leave().

00398 { return rec()[i]; }

Here is the call graph for this function:

virtual int HttpLeaveData::size  )  const [inline, virtual]
 

Reimplemented from HttpData.

Definition at line 386 of file http-aux.h.

References num_, and HttpData::size().

00386                                  { 
00387                 return HttpData::size() + (num_+1)*sizeof(int);
00388         }

Here is the call graph for this function:

AppDataType AppData::type  )  const [inline, inherited]
 

Definition at line 84 of file ns-process.h.

References AppDataType, and AppData::type_.

Referenced by Packet::accessdata(), TcpApp::process_data(), MediaClient::process_data(), MediaCache::process_data(), HttpMInvalCache::process_data(), HttpApp::process_data(), and UdpAgent::recv().

00084 { return type_; }


Member Data Documentation

int HttpLeaveData::num_ [private]
 

Definition at line 362 of file http-aux.h.

Referenced by cost(), HttpLeaveData(), num(), and size().

int* HttpLeaveData::rec_ [private]
 

Definition at line 363 of file http-aux.h.

Referenced by HttpLeaveData(), rec(), and ~HttpLeaveData().


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