OSRTStringIF Class Reference

C++ string class interface. More...

#include <OSRTStringIF.h>

Inheritance diagram for OSRTStringIF:
OSRTFastString OSRTString

List of all members.

Public Member Functions

virtual ~OSRTStringIF ()
 The destructor frees string memory using the standard 'delete' operator.
virtual OSRTStringIFclone ()=0
 This method creates a copy of the given string object.
virtual const char * getValue () const =0
 This method returns the pointer to UTF-8 null terminated string as a standard ASCII string.
virtual const OSUTF8CHAR * getUTF8Value () const =0
 This method returns the pointer to UTF-8 null terminated string as a UTF-8 string.
virtual void print (const char *name)=0
 This method prints the string value to standard output.
virtual void setValue (const char *str)=0
 This method sets the string value to the given string.
virtual void setValue (const OSUTF8CHAR *utf8str)=0
 This method sets the string value to the given UTF-8 string value.

Protected Member Functions

 OSRTStringIF ()
 The default constructor creates an empty string.
 OSRTStringIF (const char *)
 This constructor initializes the string to contain the given standard ASCII string value.
 OSRTStringIF (const OSUTF8CHAR *)
 This constructor initializes the string to contain the given UTF-8 string value.

Detailed Description

C++ string class interface.

This defines an interface to allow different types of string derived classes to be implemented. Currently, implementations include a standard string class (OSRTString) which deep-copies all values using new/delete, and a fast string class (OSRTFastString) that just copies pointers (i.e does no memory management).

Definition at line 49 of file OSRTStringIF.h.


Constructor & Destructor Documentation

OSRTStringIF::OSRTStringIF ( const char *   )  [inline, protected]

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

Parameters:
- Null-terminated C string value

Definition at line 62 of file OSRTStringIF.h.

OSRTStringIF::OSRTStringIF ( const OSUTF8CHAR *   )  [inline, protected]

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

Parameters:
- Null-terminated C string value

Definition at line 70 of file OSRTStringIF.h.


Member Function Documentation

virtual void OSRTStringIF::print ( const char *  name  )  [pure virtual]

This method prints the string value to standard output.

Parameters:
name - Name of generated string variable.

Implemented in OSRTFastString, and OSRTString.

virtual void OSRTStringIF::setValue ( const OSUTF8CHAR *  utf8str  )  [pure virtual]

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

Parameters:
utf8str - C null-terminated UTF-8 string.

Implemented in OSRTFastString, and OSRTString.

virtual void OSRTStringIF::setValue ( const char *  str  )  [pure virtual]

This method sets the string value to the given string.

Parameters:
str - C null-terminated string.

Implemented in OSRTFastString, and OSRTString.


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