Panda3D

Loading...
Searching...
No Matches
httpEntityTag.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file httpEntityTag.h
10 * @author drose
11 * @date 2003-01-28
12 */
13
14#ifndef HTTPENTITYTAG_H
15#define HTTPENTITYTAG_H
16
17#include "pandabase.h"
18
19/**
20 * A container for an "entity tag" from an HTTP server. This is used to
21 * identify a particular version of a document or resource, particularly
22 * useful for verifying caches.
23 */
24 class EXPCL_PANDA_DOWNLOADER HTTPEntityTag {
25PUBLISHED:
26 INLINE HTTPEntityTag();
27 HTTPEntityTag(const std::string &text);
28 INLINE HTTPEntityTag(bool weak, const std::string &tag);
29 INLINE HTTPEntityTag(const HTTPEntityTag &copy);
30 INLINE void operator = (const HTTPEntityTag &copy);
31
32 INLINE bool is_weak() const;
33 INLINE const std::string &get_tag() const;
34 std::string get_string() const;
35
36 INLINE bool strong_equiv(const HTTPEntityTag &other) const;
37 INLINE bool weak_equiv(const HTTPEntityTag &other) const;
38
39 INLINE bool operator == (const HTTPEntityTag &other) const;
40 INLINE bool operator != (const HTTPEntityTag &other) const;
41 INLINE bool operator < (const HTTPEntityTag &other) const;
42 INLINE int compare_to(const HTTPEntityTag &other) const;
43
44 INLINE void output(std::ostream &out) const;
45
46 private:
47 bool _weak;
48 std::string _tag;
49};
50
51INLINE std::ostream &operator << (std::ostream &out, const HTTPEntityTag &url);
52
53#include "httpEntityTag.I"
54
55#endif
HTTPEntityTag
A container for an "entity tag" from an HTTP server.
Definition httpEntityTag.h:24
HTTPEntityTag::weak_equiv
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 "...
Definition httpEntityTag.I:85
HTTPEntityTag::get_string
std::string get_string() const
Returns the entity tag formatted for sending to an HTTP server (the tag is quoted,...
Definition httpEntityTag.cxx:56
HTTPEntityTag::get_tag
const std::string & get_tag() const
Returns the tag as a literal string.
Definition httpEntityTag.I:67
HTTPEntityTag::compare_to
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...
Definition httpEntityTag.I:123
HTTPEntityTag::strong_equiv
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".
Definition httpEntityTag.I:76
HTTPEntityTag::is_weak
bool is_weak() const
Returns true if the entity tag is marked as "weak".
Definition httpEntityTag.I:59
httpEntityTag.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.