#include "config.h"
#include <stdio.h>
#include <stdarg.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
Go to the source code of this file.
Compounds | |
class | CString_ |
CString. More... | |
Defines | |
#define | CString CString_ |
Define CString to be CString_. More... | |
#define | CSTR_WASTE_LIMIT 32 |
Over-allocate by this many bytes. More... | |
#define | CSTR_REUSE_ALLOC 16 |
Keep this number of prior allocations. More... | |
Typedefs | |
typedef void (* | CSTRING_CRIT )(void *hLock, bool setLock) |
Prototype for locking functions. More... | |
Functions | |
void | CString_init (void *hLock=NULL, CSTRING_CRIT locker=NULL) |
Initialize CString_ support. More... | |
void | CString_term () |
Terminate CString_ support. More... | |
bool | operator== (const CString_ &s1, const CString_ &s2) |
Compare helpers. More... | |
bool | operator== (const CString_ &s1, const char *s2) |
Compare helpers. More... | |
bool | operator== (const char *s1, const CString_ &s2) |
Compare helpers. More... | |
bool | operator!= (const CString_ &s1, const CString_ &s2) |
Compare helpers. More... | |
bool | operator!= (const CString_ &s1, const char *s2) |
Compare helpers. More... | |
bool | operator!= (const char *s1, const CString_ &s2) |
Compare helpers. More... | |
bool | operator< (const CString_ &s1, const CString_ &s2) |
Compare helpers. More... | |
bool | operator< (const CString_ &s1, const char *s2) |
Compare helpers. More... | |
bool | operator< (const char *s1, const CString_ &s2) |
Compare helpers. More... | |
bool | operator> (const CString_ &s1, const CString_ &s2) |
Compare helpers. More... | |
bool | operator> (const CString_ &s1, const char *s2) |
Compare helpers. More... | |
bool | operator> (const char *s1, const CString_ &s2) |
Compare helpers. More... | |
bool | operator<= (const CString_ &s1, const CString_ &s2) |
Compare helpers. More... | |
bool | operator<= (const CString_ &s1, const char *s2) |
Compare helpers. More... | |
bool | operator<= (const char *s1, const CString_ &s2) |
Compare helpers. More... | |
bool | operator>= (const CString_ &s1, const CString_ &s2) |
Compare helpers. More... | |
bool | operator>= (const CString_ &s1, const char *s2) |
Compare helpers. More... | |
bool | operator>= (const char *s1, const CString_ &s2) |
Compare helpers. More... |
|
Keep this number of prior allocations.
|
|
Over-allocate by this many bytes.
|
|
Define CString to be CString_.
|
|
Prototype for locking functions. If you pass a non-NULL pointer to a function of the above type to CString_init() the CString library will call it with the supplied lock handle and the setLock parameter to indicate whether to lock or to unlock. This should implement a "critical section", only one thread may be running after (*locker) (handle, true) has been called until (*locker) (handle, false) is called.
|
|
Initialize CString_ support. Unlike the MFC version of CString this version must be initialized by making the following call before instantiating any CString object. Also unlike the MFC version, at least the last one we encountered, this version can be easily adapted to be thread-safe with your personal flavor of threads. Don't forget to do any initialization of your thread library BEFORE initializing CString_ support. |
|
Terminate CString_ support. It isn't absolutely necessary to terminate the CString_ support code but if you don't you will have at least one memory leak. Don't forget to do any termination of your thread library AFTER terminating CString_ support. |
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|
|
Compare helpers.
|