OSRTFastString Class Reference

#include <OSRTFastString.h>

List of all members.

Public Member Functions

 OSRTFastString ()
 OSRTFastString (const char *strval)
 OSRTFastString (const OSUTF8CHAR *strval)
 OSRTFastString (const OSRTFastString &str)
virtual ~OSRTFastString ()
virtual OSRTStringIF * clone ()
virtual const char * getValue () const
virtual const OSUTF8CHAR * getUTF8Value () const
virtual void print (const char *name)
virtual void setValue (const char *str)
virtual void setValue (const OSUTF8CHAR *str)
OSRTFastStringoperator= (const OSRTFastString &original)

Protected Attributes

const OSUTF8CHAR * mValue

Detailed Description

C++ fast string class definition. This can be used to hold standard ASCII or UTF-8 strings. This string class implementations directly assigns any assigned pointers to internal member variables. It does no memory management.


Constructor & Destructor Documentation

OSRTFastString::OSRTFastString (  ) 

The default constructor sets the internal string member variable pointer to null.

OSRTFastString::OSRTFastString ( const char *  strval  ) 

This constructor initializes the string to contain the given standard ASCII string value.

Parameters:
strval - Null-terminated C string value
OSRTFastString::OSRTFastString ( const OSUTF8CHAR *  strval  ) 

This constructor initializes the string to contain the given UTF-8 string value.

Parameters:
strval - Null-terminated C string value
OSRTFastString::OSRTFastString ( const OSRTFastString str  ) 

Copy constructor. String data is not copied; the pointer is simply assigned to the target class member variable.

Parameters:
str - C++ string object to be copied.
virtual OSRTFastString::~OSRTFastString (  )  [virtual]

The destructor does nothing.


Member Function Documentation

virtual OSRTStringIF* OSRTFastString::clone (  )  [inline, virtual]

This method creates a copy of the given string object.

virtual const OSUTF8CHAR* OSRTFastString::getUTF8Value (  )  const [inline, virtual]

This method returns the pointer to UTF-8 null terminated string as a UTF-8 string.

virtual const char* OSRTFastString::getValue (  )  const [inline, virtual]

This method returns the pointer to UTF-8 null terminated string as a standard ASCII string.

OSRTFastString& OSRTFastString::operator= ( const OSRTFastString original  ) 

Assignment operator.

virtual void OSRTFastString::print ( const char *  name  )  [inline, virtual]

This method prints the string value to standard output.

Parameters:
name - Name of generated string variable.

References rtxPrintCharStr().

virtual void OSRTFastString::setValue ( const OSUTF8CHAR *  str  )  [virtual]

This method sets the string value to the given UTF-8 string value.

Parameters:
str - C null-terminated UTF-8 string.
virtual void OSRTFastString::setValue ( const char *  str  )  [virtual]

This method sets the string value to the given string.

Parameters:
str - C null-terminated string.

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