PConstantString< ParentString > Class Template Reference

Create a constant string. More...

`#include <pstring.h>`

Inheritance diagram for PConstantString< ParentString >:

## Public Member Functions

| PConstantString (typename ParentString::Initialiser init)
| ~PConstantString ()
virtual PBoolean | SetSize (PINDEX)
virtual void | AssignContents (const PContainer &)
virtual void | DestroyReference ()

## Detailed Description

### template<class ParentString>
class PConstantString< ParentString >

Create a constant string.

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.

## Constructor & Destructor Documentation

template<class ParentString >

PConstantString< ParentString >::PConstantString | ( | typename ParentString::Initialiser | init | ) |

inline

template<class ParentString >

PConstantString< ParentString >::~PConstantString | ( |  | ) |

inline

## Member Function Documentation

template<class ParentString >

virtual void PConstantString< ParentString >::AssignContents | ( | const PContainer & |  | ) |

inline virtual

References PAssertAlways, and PInvalidParameter.

template<class ParentString >

virtual void PConstantString< ParentString >::DestroyReference | ( |  | ) |

inline virtual

template<class ParentString >

virtual PBoolean PConstantString< ParentString >::SetSize | ( | PINDEX |  | ) |

inline virtual

The documentation for this class was generated from the following file:

- pstring.h