home *** CD-ROM | disk | FTP | other *** search
- #ifndef CPP_DATASTRUCTURES_STRING_H
- #define CPP_DATASTRUCTURES_STRING_H
-
- // Eine Stringklasse, die Lokalisation erlaubt.
- //
- // Autor: Jochen Becher
- //
- // Historie:
- // Version 1.0 am 3. August 94
-
- #ifndef CPP_EXCEPTIONS_EXPCETIONS_H
- #include <Classes/Exceptions/Exceptions.h>
- #endif
-
- #ifndef CPP_DATASTRUCTURES_BUFFER_H
- #include <Classes/DataStructures/Buffer.h>
- #endif
-
- class StringC {
- public:
- StringC(const STRPTR = NULL);
- StringC(ULONG l, STRPTR s);
- StringC(const StringC &);
- StringC(UBYTE);
- ~StringC();
- operator STRPTR() const;
- StringC &operator= (const StringC &);
- StringC &operator= (const STRPTR);
- StringC &operator+= (const StringC &);
- StringC &operator+= (const STRPTR);
- UBYTE &operator[] (ULONG i);
- ULONG length() const;
- ULONG bufsize() const;
- StringC left(ULONG i) const;
- StringC right(ULONG i) const;
- StringC mid(ULONG i, ULONG j) const;
- VOID doubleBuffer();
- VOID shrinkBuffer();
- VOID setBufferSize(ULONG i);
- protected:
- ULONG len;
- BufferC buffer;
- };
-
- StringC operator+ (const StringC &, const StringC &);
-
- BOOL operator== (const StringC &, const StringC &);
- BOOL operator!= (const StringC &, const StringC &);
- BOOL operator< (const StringC &, const StringC &);
- BOOL operator> (const StringC &, const StringC &);
- BOOL operator<= (const StringC &, const StringC &);
- BOOL operator>= (const StringC &, const StringC &);
-
- class ostream &operator<< (ostream &, const StringC &);
-
- class istream &operator>> (istream &, StringC &);
-
- #endif
-