Panda3D
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 {
25 PUBLISHED:
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 
51 INLINE std::ostream &operator << (std::ostream &out, const HTTPEntityTag &url);
52 
53 #include "httpEntityTag.I"
54 
55 #endif
A container for an "entity tag" from an HTTP server.
Definition: httpEntityTag.h:24
An STL function object class, this is intended to be used on any ordered collection of class objects ...
Definition: stl_compares.h:73
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.