#include <pstring.h>
Public Member Functions | |
PConstantString (typename ParentString::Initialiser init) | |
~PConstantString () | |
virtual PBoolean | SetSize (PINDEX) |
virtual void | AssignContents (const PContainer &) |
virtual void | DestroyReference () |
This is used to create a PString wrapper around a constant char string. Thus internal memory allocations are avoided as it does not change. The resultant object can be used in almost every way that a PString does, except being able modify it. However, copying to another PString instance and then making modifications is OK.
It is particularly useful in static string declarations, e.g. static const PConstantString<PString> str("A test string");
and is completely thread safe in it's construction.
PConstantString< ParentString >::PConstantString | ( | typename ParentString::Initialiser | init | ) | [inline] |
PConstantString< ParentString >::~PConstantString | ( | ) | [inline] |
virtual void PConstantString< ParentString >::AssignContents | ( | const PContainer & | ) | [inline, virtual] |
virtual void PConstantString< ParentString >::DestroyReference | ( | ) | [inline, virtual] |
virtual PBoolean PConstantString< ParentString >::SetSize | ( | PINDEX | ) | [inline, virtual] |