]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/SquidString.h
Summary: Merge String loss fix.
[thirdparty/squid.git] / src / SquidString.h
index a0bf3eab223bbf8010111016bec378461a817cf9..167fa68dbaa6b288e06ae738cad9a9068ddf2098 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: SquidString.h,v 1.3 2003/03/06 06:21:37 robertc Exp $
+ * $Id: SquidString.h,v 1.4 2003/03/06 11:51:55 robertc Exp $
  *
  * DEBUG: section 67    String
  * AUTHOR: Duane Wessels
 #ifndef SQUID_STRING_H
 #define SQUID_STRING_H
 
+#define DEBUGSTRINGS 0
+#if DEBUGSTRINGS
+#include "splay.h"
+
+class String;
+
+class StringRegistry
+{
+
+public:
+    StringRegistry() : registered(false) {}
+
+    static StringRegistry &Instance();
+
+    void add
+        (String const *);
+
+    void remove
+        (String const *);
+
+private:
+    static OBJH Stat;
+
+    static StringRegistry Instance_;
+
+    static SplayNode<String const *>::SPLAYWALKEE Stater;
+
+    Splay<String const *> entries;
+
+    bool registered;
+
+    void registerMe();
+};
+
+class StoreEntry;
+#endif
+
 class String
 {
 
@@ -75,6 +112,12 @@ public:
 
     _SQUID_INLINE_ void cutPointer (char const *loc);
 
+#if DEBUGSTRINGS
+
+    void stat (StoreEntry *) const;
+
+#endif
+
 private:
     /* never reference these directly! */
     unsigned short int size_;  /* buffer size; 64K limit */