GString.h File Reference
#include "DjVuGlobal.h"
#include "GContainer.h"
#include <stdlib.h>
#include <stdarg.h>
Go to the source code of this file.
|
Classes |
class | GBaseString |
| General purpose character string. More...
|
class | GNativeString |
| General purpose character string. More...
|
class | GStringRep |
class | GUTF8String |
| General purpose character string. More...
|
class | GStringRep::UTF8 |
Functions |
bool | operator!= (const char *s1, const GBaseString &s2) |
bool | operator< (const char s1, const GBaseString &s2) |
bool | operator< (const char *s1, const GBaseString &s2) |
bool | operator<= (const char s1, const GBaseString &s2) |
bool | operator<= (const char *s1, const GBaseString &s2) |
bool | operator== (const char *s1, const GBaseString &s2) |
bool | operator> (const char s1, const GBaseString &s2) |
bool | operator> (const char *s1, const GBaseString &s2) |
bool | operator>= (const char s1, const GBaseString &s2) |
bool | operator>= (const char *s1, const GBaseString &s2) |
GString.h |
Files #"GString.h"# and #"GString.cpp"# implement a general purpose string class {GBaseString}, with dirived types {GUTF8String} and {GNativeString} for UTF8 MBS encoding and the current Native MBS encoding respectively.
This implementation relies on smart pointers (see {GSmartPointer.h}).
{ Historical Comments} --- At some point during the DjVu research era, it became clear that C++ compilers rarely provided portable libraries. We then decided to avoid fancy classes (like iostream# or string#) and to rely only on the good old C library. A good string class however is very useful. We had already randomly picked letter 'G' to prefix class names and we logically derived the new class name. Native English speakers kept laughing in hiding. This is ironic because we completely forgot this letter 'G' when creating more challenging things like the ZP Coder or the IW44 wavelets.
{ Later Changes} When converting to I18N, we (Lizardtech) decided that two string classes where needing, replacing the original GString with {GUTF8String} and {GNativeString}.
General purpose string class. - Author:
- L\'eon Bottou <leonb@research.att.com> -- initial implementation.\
From: Leon Bottou, 1/31/2002 This file has very little to do with my initial implementation. It has been practically rewritten by Lizardtech for i18n changes. My original implementation was very small in comparison <http://prdownloads.sourceforge.net/djvu/DjVu2_2b-src.tgz>. In my opinion, the duplication of the string classes is a failed attempt to use the type system to enforce coding policies. This could be fixed. But there are better things to do in djvulibre.
- Version:
- $Id: GString.h,v 1.19 2004/08/06 15:11:29 leonb Exp $#
|
#define | GBaseString GUTF8String |
typedef int | mbstate_t |
Define Documentation
Typedef Documentation
Function Documentation
bool operator!= |
( |
const char * |
s1, |
|
|
const GBaseString & |
s2 | |
|
) |
| | [inline] |
bool operator< |
( |
const char |
s1, |
|
|
const GBaseString & |
s2 | |
|
) |
| | [inline] |
bool operator< |
( |
const char * |
s1, |
|
|
const GBaseString & |
s2 | |
|
) |
| | [inline] |
bool operator<= |
( |
const char |
s1, |
|
|
const GBaseString & |
s2 | |
|
) |
| | [inline] |
bool operator<= |
( |
const char * |
s1, |
|
|
const GBaseString & |
s2 | |
|
) |
| | [inline] |
bool operator== |
( |
const char * |
s1, |
|
|
const GBaseString & |
s2 | |
|
) |
| | [inline] |
bool operator> |
( |
const char |
s1, |
|
|
const GBaseString & |
s2 | |
|
) |
| | [inline] |
bool operator> |
( |
const char * |
s1, |
|
|
const GBaseString & |
s2 | |
|
) |
| | [inline] |
bool operator>= |
( |
const char |
s1, |
|
|
const GBaseString & |
s2 | |
|
) |
| | [inline] |
bool operator>= |
( |
const char * |
s1, |
|
|
const GBaseString & |
s2 | |
|
) |
| | [inline] |