diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-02-11 05:29:41 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-02-11 05:29:41 +0000 |
commit | f4b191f0ea396b58465bfba40749977780a3af58 (patch) | |
tree | 891490e91ab3b67524be67b2b71c85d84fd2f92a /src/old/staticstring.h | |
parent | 292ae9453e7fdb2f1023ed9dfc99cbcd751f8b90 (diff) | |
download | libbu++-f4b191f0ea396b58465bfba40749977780a3af58.tar.gz libbu++-f4b191f0ea396b58465bfba40749977780a3af58.tar.bz2 libbu++-f4b191f0ea396b58465bfba40749977780a3af58.tar.xz libbu++-f4b191f0ea396b58465bfba40749977780a3af58.zip |
Just removing some things that are cluttering up the source tree.
Diffstat (limited to 'src/old/staticstring.h')
-rw-r--r-- | src/old/staticstring.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/old/staticstring.h b/src/old/staticstring.h deleted file mode 100644 index 4c3f7b8..0000000 --- a/src/old/staticstring.h +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | #ifndef STATIC_STRING_H | ||
2 | #define STATIC_STRING_H | ||
3 | |||
4 | #include <string> | ||
5 | #include "serializable.h" | ||
6 | //#include "hashable.h" | ||
7 | |||
8 | /** | ||
9 | * Simple string managing class. Allows for dynamically allocated string data | ||
10 | * along with some minor caching to speed things up when accessing your | ||
11 | * string data. Really designed for making copies of strings easy and safe, | ||
12 | * and making accessing meta-info like length fast and reliable as well. | ||
13 | *@author Mike Buland | ||
14 | */ | ||
15 | class StaticString : public Serializable/*, public Hashable*/ | ||
16 | { | ||
17 | public: | ||
18 | StaticString(); | ||
19 | StaticString( const char *lpNewStr, int nNewLen ); | ||
20 | StaticString( const char *lpNewStr ); | ||
21 | StaticString( StaticString &xSrcStr, int nNewLen ); | ||
22 | StaticString( StaticString &xSrcStr ); | ||
23 | StaticString( const StaticString &xSrcStr ); | ||
24 | StaticString( int nLength ); | ||
25 | virtual ~StaticString(); | ||
26 | |||
27 | char *getString(); | ||
28 | const char *getString() const; | ||
29 | int getLength() const; | ||
30 | void setLength( int nNewLength ); | ||
31 | |||
32 | void setString( const char *lpNewStr, int nNewLen=-1 ); | ||
33 | void setString( StaticString &sNewStr, int nNewLen=-1 ); | ||
34 | |||
35 | char getAt( unsigned int nIndex ); | ||
36 | void setAt( unsigned int nIndex, char cVal ); | ||
37 | |||
38 | class StaticString &operator=( class StaticString &lpOtherStr ); | ||
39 | class StaticString &operator=( std::string &lpOtherStr ); | ||
40 | class StaticString &operator=( const char *lpNewStr ); | ||
41 | operator const char *(); | ||
42 | char &operator[]( unsigned int nIndex ); | ||
43 | operator int(); | ||
44 | char *operator+( int nAmnt ); | ||
45 | char *operator-( int nAmnt ); | ||
46 | bool operator==( const char *str ); | ||
47 | bool operator==( StaticString &str ); | ||
48 | bool operator!=( const char *str ); | ||
49 | bool operator!=( StaticString &str ); | ||
50 | |||
51 | void clear(); | ||
52 | |||
53 | virtual void serialize( class Serializer &ar ); | ||
54 | |||
55 | //virtual unsigned long int getHashCode(); | ||
56 | //virtual bool compareForHash( Hashable &other ); | ||
57 | |||
58 | private: | ||
59 | char *lpStr; | ||
60 | uint32_t nLen; | ||
61 | }; | ||
62 | |||
63 | #endif | ||