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

HTTPEntityTag Class Reference

A container for an "entity tag" from an HTTP server. More...

#include <httpEntityTag.h>

List of all members.

Public Member Functions

 HTTPEntityTag ()
 HTTPEntityTag (const string &text)
 This constructor accepts a string as formatted from an HTTP server (e.g.

 HTTPEntityTag (bool weak, const string &tag)
 This constructor accepts an explicit weak flag and a literal (not quoted) tag string.

 HTTPEntityTag (const HTTPEntityTag &copy)
void operator= (const HTTPEntityTag &copy)
bool is_weak () const
 Returns true if the entity tag is marked as "weak".

const string & get_tag () const
 Returns the tag as a literal string.

string get_string () const
 Returns the entity tag formatted for sending to an HTTP server (the tag is quoted, with a conditional W/ prefix).

bool strong_equiv (const HTTPEntityTag &other) const
 Returns true if the two tags have "strong" equivalence: they are the same tag, and both are "strong".

bool weak_equiv (const HTTPEntityTag &other) const
 Returns true if the two tags have "weak" equivalence: they are the same tag, and one or both may be "weak".

bool operator== (const HTTPEntityTag &other) const
 The == operator tests object equivalence; see also strong_equiv() and weak_equiv() for the two kinds of HTTP equivalence.

bool operator!= (const HTTPEntityTag &other) const
bool operator< (const HTTPEntityTag &other) const
int compare_to (const HTTPEntityTag &other) const
 Returns a number less than zero if this HTTPEntityTag sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent.

void output (ostream &out) const

Private Attributes

bool _weak
string _tag


Detailed Description

A container for an "entity tag" from an HTTP server.

This is used to identify a particular version of a document or resource, particularly useful for verifying caches.

Definition at line 40 of file httpEntityTag.h.


Constructor & Destructor Documentation

HTTPEntityTag::HTTPEntityTag  )  [inline]
 

Definition at line 32 of file httpEntityTag.I.

References INLINE.

HTTPEntityTag::HTTPEntityTag const string &  text  ) 
 

This constructor accepts a string as formatted from an HTTP server (e.g.

the tag is quoted, with an optional W/ prefix.)

Definition at line 38 of file httpEntityTag.cxx.

HTTPEntityTag::HTTPEntityTag bool  weak,
const string &  tag
[inline]
 

This constructor accepts an explicit weak flag and a literal (not quoted) tag string.

Definition at line 47 of file httpEntityTag.I.

References INLINE.

HTTPEntityTag::HTTPEntityTag const HTTPEntityTag &  copy  )  [inline]
 

Definition at line 61 of file httpEntityTag.I.

References _tag, and _weak.


Member Function Documentation

int HTTPEntityTag::compare_to const HTTPEntityTag &  other  )  const [inline]
 

Returns a number less than zero if this HTTPEntityTag sorts before the other one, greater than zero if it sorts after, or zero if they are equivalent.

Definition at line 201 of file httpEntityTag.I.

string HTTPEntityTag::get_string  )  const
 

Returns the entity tag formatted for sending to an HTTP server (the tag is quoted, with a conditional W/ prefix).

Definition at line 78 of file httpEntityTag.cxx.

const string & HTTPEntityTag::get_tag  )  const [inline]
 

Returns the tag as a literal string.

Definition at line 110 of file httpEntityTag.I.

bool HTTPEntityTag::is_weak  )  const [inline]
 

Returns true if the entity tag is marked as "weak".

A consistent weak entity tag does not guarantee that its resource has not changed in any way, but it does promise that the resource has not changed in any semantically meaningful way.

Definition at line 97 of file httpEntityTag.I.

References _tag, and _weak.

bool HTTPEntityTag::operator!= const HTTPEntityTag &  other  )  const [inline]
 

Definition at line 169 of file httpEntityTag.I.

bool HTTPEntityTag::operator< const HTTPEntityTag &  other  )  const [inline]
 

Definition at line 181 of file httpEntityTag.I.

void HTTPEntityTag::operator= const HTTPEntityTag &  copy  )  [inline]
 

Definition at line 75 of file httpEntityTag.I.

References _weak, and INLINE.

bool HTTPEntityTag::operator== const HTTPEntityTag &  other  )  const [inline]
 

The == operator tests object equivalence; see also strong_equiv() and weak_equiv() for the two kinds of HTTP equivalence.

Definition at line 157 of file httpEntityTag.I.

References _weak.

Referenced by strong_equiv().

void HTTPEntityTag::output ostream &  out  )  const [inline]
 

Definition at line 217 of file httpEntityTag.I.

bool HTTPEntityTag::strong_equiv const HTTPEntityTag &  other  )  const [inline]
 

Returns true if the two tags have "strong" equivalence: they are the same tag, and both are "strong".

Definition at line 125 of file httpEntityTag.I.

References INLINE, and operator==().

bool HTTPEntityTag::weak_equiv const HTTPEntityTag &  other  )  const [inline]
 

Returns true if the two tags have "weak" equivalence: they are the same tag, and one or both may be "weak".

Definition at line 140 of file httpEntityTag.I.

References _tag, and _weak.


Member Data Documentation

string HTTPEntityTag::_tag [private]
 

Definition at line 64 of file httpEntityTag.h.

Referenced by HTTPEntityTag(), is_weak(), and weak_equiv().

bool HTTPEntityTag::_weak [private]
 

Definition at line 63 of file httpEntityTag.h.

Referenced by HTTPEntityTag(), is_weak(), operator=(), operator==(), and weak_equiv().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:51:33 2003 for Panda by doxygen1.3