#include <string>
#include <vector>
#include <ptlib/array.h>
Go to the source code of this file.
Classes | |
class | PString |
class | PCaselessString |
class | PStringStream |
class | PStringArray |
class | PStringList |
class | PSortedStringList |
class | PStringSet |
class | PStringDictionary< K > |
class | POrdinalToString |
struct | POrdinalToString::Initialiser |
Structure for static array initialiser for class. More... | |
class | PStringToOrdinal |
struct | PStringToOrdinal::Initialiser |
Structure for static array initialiser for class. More... | |
class | PStringToString |
struct | PStringToString::Initialiser |
Structure for static array initialiser for class. More... | |
class | PRegularExpression |
Defines | |
#define | PDECLARE_STRING_DICTIONARY(cls, K) |
#define | PSTRING_DICTIONARY(cls, K) typedef PStringDictionary<K> cls |
Functions | |
PBASEARRAY (PWCharArray, wchar_t) | |
ostream & | operator<< (ostream &stream, const PString &string) |
PString | psprintf (const char *cfmt,...) |
#define PDECLARE_STRING_DICTIONARY | ( | cls, | |||
K | ) |
Value:
PDECLARE_CLASS(cls, PStringDictionary<K>) \ protected: \ cls(int dummy, const cls * c) \ : PStringDictionary<K>(dummy, c) { } \ public: \ cls() \ : PStringDictionary<K>() { } \ virtual PObject * Clone() const \ { return PNEW cls(0, this); } \
If the compilation is using templates then this macro produces a descendent of the PStringDictionary# template class. If templates are not being used then the macro defines a set of inline functions to do all casting of types. The resultant classes have an identical set of functions in either case.
See the PStringDictionary# and PAbstractDictionary# classes for more information.
#define PSTRING_DICTIONARY | ( | cls, | |||
K | ) | typedef PStringDictionary<K> cls |
Declare a dictionary of strings class. This macro is used to declare a descendent of PAbstractDictionary class, customised for a particular key type { K} and data object type PString#. This macro closes the class declaration off so no additional members can be added.
If the compilation is using templates then this macro produces a typedef of the PStringDictionary# template class.
See the PStringDictionary# class and PDECLARE_STRING_DICTIONARY# macro for more information.
ostream& operator<< | ( | ostream & | stream, | |
const PString & | string | |||
) | [inline] |
PBASEARRAY | ( | PWCharArray | , | |
wchar_t | ||||
) |
PString psprintf | ( | const char * | cfmt, | |
... | ||||
) |
Produce formatted output as a string. This is identical to the standard C library sprintf()# function, but sends its output to a PString#.
This function makes the assumption that there is less the 1000 characters of formatted output. The function will assert if this occurs.
Note that this function will break the current instance from multiple references to the string. A new string buffer is allocated and the data from the old string buffer copied to it.
cfmt | C string for output format. |