21 INLINE HTTPEntityTag::
32 INLINE HTTPEntityTag::
33 HTTPEntityTag(
bool weak,
const string &tag) :
44 INLINE HTTPEntityTag::
56 INLINE
void HTTPEntityTag::
94 return _tag == other._tag && !_weak && !other._weak;
105 return _tag == other._tag;
117 return _weak == other._weak && _tag == other._tag;
125 INLINE
bool HTTPEntityTag::
135 INLINE
bool HTTPEntityTag::
137 if (_weak != other._weak) {
138 return (
int)_weak < (int)other._weak;
140 return _tag < other._tag;
152 if (_weak != other._weak) {
153 return (
int)_weak - (int)other._weak;
155 return strcmp(_tag.c_str(), other._tag.c_str());
163 INLINE
void HTTPEntityTag::
164 output(ostream &out)
const {
171 entityTag.output(out);
bool is_weak() const
Returns true if the entity tag is marked as "weak".
A container for an "entity tag" from an HTTP server.
bool operator==(const HTTPEntityTag &other) const
The == operator tests object equivalence; see also strong_equiv() and weak_equiv() for the two kinds ...
int compare_to(const HTTPEntityTag &other) const
Returns a number less than zero if this HTTPEntityTag sorts before the other one, greater than zero i...
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 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 "...