HttpLeaveData Class Reference

#include <http-aux.h>

Inheritance diagram for HttpLeaveData:

HttpData AppData Collaboration diagram for HttpLeaveData:

Collaboration graph
[legend]

Detailed Description

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

Public Member Functions

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

Private Member Functions

int * rec ()

Private Attributes

int num_
int * rec_


Constructor & Destructor Documentation

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

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

References num_, and rec_.

Referenced by copy().

00391                                  : HttpData(HTTP_LEAVE, id) {
00392         num_ = n;
00393         if (num_ > 0)
00394             rec_ = new int[num_];
00395         else
00396             rec_ = NULL;
00397     }

HttpLeaveData::HttpLeaveData HttpLeaveData d  )  [inline]
 

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

References num_, and rec_.

00398                                     : HttpData(d) {
00399         num_ = d.num_;
00400         if (num_ > 0) {
00401             rec_ = new int[num_];
00402             memcpy(rec_, d.rec_, num_*sizeof(int));
00403         } else
00404             rec_ = NULL;
00405     }

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

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

References rec_.

00406                              { 
00407         if (rec_ != NULL)
00408             delete []rec_; 
00409     }


Member Function Documentation

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

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

References rec().

Referenced by NeighborCache::pack_leave().

00420                                    {
00421         rec()[i] = id;
00422     }

Here is the call graph for this function:

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

Reimplemented from HttpData.

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

References HttpLeaveData().

00415                             {
00416         return (new HttpLeaveData(*this));
00417     }

Here is the call graph for this function:

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

Reimplemented from HttpData.

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

References HTTPLEAVE_COST, and num_.

Referenced by HttpMInvalCache::send_leave().

00414 { return num_*HTTPLEAVE_COST; }

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

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

References HttpData::id_.

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

00184 { return id_; }

int HttpLeaveData::num  )  const [inline]
 

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

References num_.

Referenced by HttpMInvalCache::recv_leave().

00419 { return num_; }

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

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

References rec_.

Referenced by add(), and rec_id().

00389 { return rec_; }

int HttpLeaveData::rec_id int  i  )  [inline]
 

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

References rec().

00423 { return rec()[i]; }

Here is the call graph for this function:

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

Reimplemented from HttpData.

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

References num_, and HttpData::size().

00411                              { 
00412         return HttpData::size() + (num_+1)*sizeof(int);
00413     }

Here is the call graph for this function:

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

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

References AppData::type_.

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

00105 { return type_; }


Field Documentation

int HttpLeaveData::num_ [private]
 

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

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

int* HttpLeaveData::rec_ [private]
 

Definition at line 388 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 Mar 6 17:10:43 2007 for ns2 Network Simulator 2.29 by  doxygen 1.4.6