aboutsummaryrefslogtreecommitdiff
path: root/src/staticstring.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-07-26 21:58:35 +0000
committerMike Buland <eichlan@xagasoft.com>2006-07-26 21:58:35 +0000
commit76ed3c164662f4ee4c109bb2054c61c99ea86251 (patch)
tree301d4687f95a457304b0e796984b62fa89992718 /src/staticstring.h
parent579c3ac445043122b0a702bdb2542d9ea404b62e (diff)
downloadlibbu++-76ed3c164662f4ee4c109bb2054c61c99ea86251.tar.gz
libbu++-76ed3c164662f4ee4c109bb2054c61c99ea86251.tar.bz2
libbu++-76ed3c164662f4ee4c109bb2054c61c99ea86251.tar.xz
libbu++-76ed3c164662f4ee4c109bb2054c61c99ea86251.zip
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.
Diffstat (limited to 'src/staticstring.h')
-rw-r--r--src/staticstring.h11
1 files changed, 8 insertions, 3 deletions
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 @@
3 3
4#include <string> 4#include <string>
5#include "serializable.h" 5#include "serializable.h"
6//#include "hashable.h"
6 7
7/** 8/**
8 * Simple string managing class. Allows for dynamically allocated string data 9 * Simple string managing class. Allows for dynamically allocated string data
@@ -11,12 +12,14 @@
11 * and making accessing meta-info like length fast and reliable as well. 12 * and making accessing meta-info like length fast and reliable as well.
12 *@author Mike Buland 13 *@author Mike Buland
13 */ 14 */
14class StaticString : public Serializable 15class StaticString : public Serializable//, public Hashable
15{ 16{
16public: 17public:
17 StaticString(); 18 StaticString();
18 StaticString( const char *lpNewStr, int nNewLen=-1 ); 19 StaticString( const char *lpNewStr, int nNewLen );
19 StaticString( StaticString &xSrcStr, int nNewLen=-1 ); 20 StaticString( const char *lpNewStr );
21 StaticString( StaticString &xSrcStr, int nNewLen );
22 StaticString( StaticString &xSrcStr );
20 StaticString( int nLength ); 23 StaticString( int nLength );
21 virtual ~StaticString(); 24 virtual ~StaticString();
22 25
@@ -47,6 +50,8 @@ public:
47 50
48 virtual void serialize( class Serializer &ar ); 51 virtual void serialize( class Serializer &ar );
49 52
53 virtual unsigned long int getHashCode();
54
50private: 55private:
51 char *lpStr; 56 char *lpStr;
52 int nLen; 57 int nLen;