StaticString Class Reference

Inheritance diagram for StaticString:

PlugInBase<IString> IString IBase


Public Methods

 StaticString (const char *in)
virtual const char * str ()

Detailed Description

This is an implementation of the IString interface that can be used to efficiently pass strings that will be valid for the life of the process (i.e. static strings). The StaticString class assumes that it can copy the pointer value of the initialization string, rather than copying the contents of the buffer. DO NOT USE THIS FOR NON-STATIC STRINGS! Clients of an interface that returns a StaticString as the implementation of the IString interface can hold the pointer to that interface for an arbitrarily long period of time.


Constructor & Destructor Documentation

StaticString::StaticString const char *    in [inline]
 

This is the constructor for the StaticString class. It takes in a pointer to a string that is assumed to be valid for the duration of the current process.

Parameters:
in A pointer to a static string buffer.


Member Function Documentation

const char * StaticString::str   [inline, virtual]
 

This function is used to access the actual character buffer controlled by the StringImp.

Implements IString.


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

Return to top of page