From 76ed3c164662f4ee4c109bb2054c61c99ea86251 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 26 Jul 2006 21:58:35 +0000 Subject: Added the not-yet-working hash class. More thought must be done. This doesn't actually change any existing code really just adds a new class that you can't use because it's commented out. I'll probably move it to a branch. --- src/staticstring.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/staticstring.h') diff --git a/src/staticstring.h b/src/staticstring.h index 732e860..68ca7ea 100644 --- a/src/staticstring.h +++ b/src/staticstring.h @@ -3,6 +3,7 @@ #include #include "serializable.h" +//#include "hashable.h" /** * Simple string managing class. Allows for dynamically allocated string data @@ -11,12 +12,14 @@ * and making accessing meta-info like length fast and reliable as well. *@author Mike Buland */ -class StaticString : public Serializable +class StaticString : public Serializable//, public Hashable { public: StaticString(); - StaticString( const char *lpNewStr, int nNewLen=-1 ); - StaticString( StaticString &xSrcStr, int nNewLen=-1 ); + StaticString( const char *lpNewStr, int nNewLen ); + StaticString( const char *lpNewStr ); + StaticString( StaticString &xSrcStr, int nNewLen ); + StaticString( StaticString &xSrcStr ); StaticString( int nLength ); virtual ~StaticString(); @@ -47,6 +50,8 @@ public: virtual void serialize( class Serializer &ar ); + virtual unsigned long int getHashCode(); + private: char *lpStr; int nLen; -- cgit v1.2.3