Panda3D
|
00001 // Filename: httpEntityTag.h 00002 // Created by: drose (28Jan03) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef HTTPENTITYTAG_H 00016 #define HTTPENTITYTAG_H 00017 00018 #include "pandabase.h" 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Class : HTTPEntityTag 00022 // Description : A container for an "entity tag" from an HTTP server. 00023 // This is used to identify a particular version of a 00024 // document or resource, particularly useful for 00025 // verifying caches. 00026 //////////////////////////////////////////////////////////////////// 00027 class EXPCL_PANDAEXPRESS HTTPEntityTag { 00028 PUBLISHED: 00029 INLINE HTTPEntityTag(); 00030 HTTPEntityTag(const string &text); 00031 INLINE HTTPEntityTag(bool weak, const string &tag); 00032 INLINE HTTPEntityTag(const HTTPEntityTag ©); 00033 INLINE void operator = (const HTTPEntityTag ©); 00034 00035 INLINE bool is_weak() const; 00036 INLINE const string &get_tag() const; 00037 string get_string() const; 00038 00039 INLINE bool strong_equiv(const HTTPEntityTag &other) const; 00040 INLINE bool weak_equiv(const HTTPEntityTag &other) const; 00041 00042 INLINE bool operator == (const HTTPEntityTag &other) const; 00043 INLINE bool operator != (const HTTPEntityTag &other) const; 00044 INLINE bool operator < (const HTTPEntityTag &other) const; 00045 INLINE int compare_to(const HTTPEntityTag &other) const; 00046 00047 INLINE void output(ostream &out) const; 00048 00049 private: 00050 bool _weak; 00051 string _tag; 00052 }; 00053 00054 INLINE ostream &operator << (ostream &out, const HTTPEntityTag &url); 00055 00056 #include "httpEntityTag.I" 00057 00058 #endif