A container for an "entity tag" from an HTTP server. More...
#include "httpEntityTag.h"
Public Member Functions | |
HTTPEntityTag (const std::string &text) | |
This constructor accepts a string as formatted from an HTTP server (e.g. More... | |
HTTPEntityTag (bool weak, const std::string &tag) | |
This constructor accepts an explicit weak flag and a literal (not quoted) tag string. More... | |
HTTPEntityTag (const HTTPEntityTag ©) | |
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. More... | |
std::string | get_string () const |
Returns the entity tag formatted for sending to an HTTP server (the tag is quoted, with a conditional W prefix). More... | |
const std::string & | get_tag () const |
Returns the tag as a literal string. More... | |
bool | is_weak () const |
Returns true if the entity tag is marked as "weak". More... | |
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. More... | |
void | output (std::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". More... | |
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". More... | |
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 24 of file httpEntityTag.h.
HTTPEntityTag::HTTPEntityTag | ( | const std::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 24 of file httpEntityTag.cxx.
|
inline |
This constructor accepts an explicit weak flag and a literal (not quoted) tag string.
Definition at line 27 of file httpEntityTag.I.
|
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 123 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 56 of file httpEntityTag.cxx.
|
inline |
Returns the tag as a literal string.
Definition at line 67 of file httpEntityTag.I.
|
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 59 of file httpEntityTag.I.
|
inline |
The == operator tests object equivalence; see also strong_equiv() and weak_equiv() for the two kinds of HTTP equivalence.
Definition at line 94 of file httpEntityTag.I.
|
inline |
Returns true if the two tags have "strong" equivalence: they are the same tag, and both are "strong".
Definition at line 76 of file httpEntityTag.I.
|
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 85 of file httpEntityTag.I.