Panda3D
|
A container for an "entity tag" from an HTTP server. More...
#include "httpEntityTag.h"
Public Member Functions | |
HTTPEntityTag (const string &text) | |
This constructor accepts a string as formatted from an HTTP server (e.g. | |
HTTPEntityTag (const HTTPEntityTag ©) | |
HTTPEntityTag (bool weak, const string &tag) | |
This constructor accepts an explicit weak flag and a literal (not quoted) tag string. | |
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. | |
string | get_string () const |
Returns the entity tag formatted for sending to an HTTP server (the tag is quoted, with a conditional W/ prefix). | |
const string & | get_tag () const |
Returns the tag as a literal string. | |
bool | is_weak () const |
Returns true if the entity tag is marked as "weak". | |
bool | operator!= (const HTTPEntityTag &other) const |
bool | operator< (const HTTPEntityTag &other) const |
void | operator= (const HTTPEntityTag ©) |
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. | |
void | output (ostream &out) const |
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". |
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 27 of file httpEntityTag.h.
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 26 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 33 of file httpEntityTag.I.
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 151 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 61 of file httpEntityTag.cxx.
const string & HTTPEntityTag::get_tag | ( | ) | const [inline] |
Returns the tag as a literal string.
Definition at line 82 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 72 of file httpEntityTag.I.
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 116 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 93 of file httpEntityTag.I.
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 104 of file httpEntityTag.I.