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

HttpUpdateData Class Reference

#include <http-aux.h>

Inheritance diagram for HttpUpdateData:

Inheritance graph
[legend]
Collaboration diagram for HttpUpdateData:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 HttpUpdateData (int id, int n)
 HttpUpdateData (HttpUpdateData &d)
virtual ~HttpUpdateData ()
virtual int size () const
virtual int cost () const
virtual AppDatacopy ()
int num () const
int pgsize () const
void set_pgsize (int s)
void add (int i, ClientPage *p)
char * rec_page (int i)
int & rec_size (int i)
double & rec_age (int i)
double & rec_mtime (int i)
int & id ()
AppDataType type () const

Private Member Functions

PageRecrec ()

Private Attributes

int num_
int pgsize_
PageRecrec_

Constructor & Destructor Documentation

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

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

References HTTP_UPDATE, num_, pgsize_, and rec_.

Referenced by copy().

00310                                       : HttpData(HTTP_UPDATE, id) {
00311                 num_ = n;
00312                 pgsize_ = 0;
00313                 if (num_ > 0)
00314                         rec_ = new PageRec[num_];
00315                 else
00316                         rec_ = NULL;
00317         }

HttpUpdateData::HttpUpdateData HttpUpdateData d  )  [inline]
 

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

References num_, pgsize_, and rec_.

00318                                           : HttpData(d) {
00319                 num_ = d.num_;
00320                 pgsize_ = d.pgsize_;
00321                 if (num_ > 0) {
00322                         rec_ = new PageRec[num_];
00323                         memcpy(rec_, d.rec_, num_*sizeof(PageRec));
00324                 } else
00325                         rec_ = NULL;
00326         }

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

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

References rec_.

00327                                   {
00328                 if (rec_ != NULL)
00329                         delete []rec_;
00330         }


Member Function Documentation

void HttpUpdateData::add int  i,
ClientPage p
[inline]
 

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

References HttpUpdateData::PageRec::copy(), pgsize_, rec(), and Page::size().

Referenced by HttpMInvalCache::pack_upd().

00344                                               {
00345                 rec()[i].copy(p);
00346                 pgsize_ += p->size();
00347         }

Here is the call graph for this function:

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

Reimplemented from HttpData.

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

References HttpUpdateData().

00336                                 {
00337                 return (new HttpUpdateData(*this));
00338         }

Here is the call graph for this function:

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

Reimplemented from HttpData.

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

References pgsize_.

00335 { return pgsize_; }

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 HttpUpdateData::num  )  const [inline]
 

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

References num_.

Referenced by HttpMInvalCache::recv_upd().

00340 { return num_; }

int HttpUpdateData::pgsize  )  const [inline]
 

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

References pgsize_.

Referenced by HttpMInvalCache::recv_upd(), and HttpMInvalCache::send_upd().

00341 { return pgsize_; }

PageRec* HttpUpdateData::rec  )  [inline, private]
 

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

References rec_.

Referenced by add(), rec_age(), rec_mtime(), rec_page(), and rec_size().

00308 { return rec_; }

double& HttpUpdateData::rec_age int  i  )  [inline]
 

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

References HttpUpdateData::PageRec::age_, and rec().

Referenced by HttpMInvalCache::command(), and HttpMInvalCache::recv_upd().

00351 { return rec()[i].age_; }

Here is the call graph for this function:

double& HttpUpdateData::rec_mtime int  i  )  [inline]
 

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

References HttpUpdateData::PageRec::mtime_, and rec().

Referenced by HttpMInvalCache::command(), and HttpMInvalCache::recv_upd().

00352 { return rec()[i].mtime_; }

Here is the call graph for this function:

char* HttpUpdateData::rec_page int  i  )  [inline]
 

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

References HttpUpdateData::PageRec::pg_, and rec().

Referenced by HttpMInvalCache::command(), and HttpMInvalCache::recv_upd().

00349 { return rec()[i].pg_; }

Here is the call graph for this function:

int& HttpUpdateData::rec_size int  i  )  [inline]
 

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

References rec(), and HttpUpdateData::PageRec::size_.

Referenced by HttpMInvalCache::command(), and HttpMInvalCache::recv_upd().

00350 { return rec()[i].size_; }

Here is the call graph for this function:

void HttpUpdateData::set_pgsize int  s  )  [inline]
 

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

References pgsize_.

Referenced by HttpMInvalCache::command().

00343 { pgsize_ = s; }

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

Reimplemented from HttpData.

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

References num_, and HttpData::size().

00332                                  { 
00333                 return HttpData::size() + 2*sizeof(int)+num_*sizeof(PageRec); 
00334         }

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 HttpUpdateData::num_ [private]
 

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

Referenced by HttpUpdateData(), num(), and size().

int HttpUpdateData::pgsize_ [private]
 

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

Referenced by add(), cost(), HttpUpdateData(), pgsize(), and set_pgsize().

PageRec* HttpUpdateData::rec_ [private]
 

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

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


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