OSRTString Class Reference
#include <OSRTString.h>
Public Member Functions | |
EXTRTMETHOD | OSRTString () |
EXTRTMETHOD | OSRTString (const char *strval) |
EXTRTMETHOD | OSRTString (const OSUTF8CHAR *strval) |
EXTRTMETHOD | OSRTString (const OSRTString &str) |
virtual EXTRTMETHOD | ~OSRTString () |
virtual OSRTStringIF * | clone () |
virtual const char * | getValue () const |
virtual const OSUTF8CHAR * | getUTF8Value () const |
virtual void | print (const char *name) |
virtual EXTRTMETHOD void | setValue (const char *str) |
virtual EXTRTMETHOD void | setValue (const OSUTF8CHAR *str) |
EXTRTMETHOD OSRTString & | operator= (const OSRTString &original) |
Protected Attributes | |
OSUTF8CHAR * | mValue |
Detailed Description
C++ string class definition. This can be used to hold standard ASCII or UTF-8 strings. The standard C++ 'new' and 'delete' operators are used to allocate/free memory for the strings. All strings are deep-copied.
Constructor & Destructor Documentation
EXTRTMETHOD OSRTString::OSRTString | ( | ) |
The default constructor creates an empty string.
EXTRTMETHOD OSRTString::OSRTString | ( | const char * | strval | ) |
This constructor initializes the string to contain the given standard ASCII string value.
- Parameters:
-
strval - Null-terminated C string value
EXTRTMETHOD OSRTString::OSRTString | ( | const OSUTF8CHAR * | strval | ) |
This constructor initializes the string to contain the given UTF-8 string value.
- Parameters:
-
strval - Null-terminated C string value
EXTRTMETHOD OSRTString::OSRTString | ( | const OSRTString & | str | ) |
Copy constructor.
- Parameters:
-
str - C++ string object to be copied.
virtual EXTRTMETHOD OSRTString::~OSRTString | ( | ) | [virtual] |
The destructor frees string memory using the standard 'delete' operator.
Member Function Documentation
virtual OSRTStringIF* OSRTString::clone | ( | ) | [inline, virtual] |
This method creates a copy of the given string object.
virtual const OSUTF8CHAR* OSRTString::getUTF8Value | ( | ) | const [inline, virtual] |
This method returns the pointer to UTF-8 null terminated string as a UTF-8 string.
virtual const char* OSRTString::getValue | ( | ) | const [inline, virtual] |
This method returns the pointer to UTF-8 null terminated string as a standard ASCII string.
EXTRTMETHOD OSRTString& OSRTString::operator= | ( | const OSRTString & | original | ) |
Assignment operator.
virtual void OSRTString::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 EXTRTMETHOD void OSRTString::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 EXTRTMETHOD void OSRTString::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: