OSRTString Class Reference
C++ string class definition. More...
#include <OSRTString.h>
Inheritance diagram for OSRTString:
![](classOSRTString.png)
Public Member Functions | |
EXTRTMETHOD | OSRTString () |
The default constructor creates an empty string. | |
EXTRTMETHOD | OSRTString (const char *strval) |
This constructor initializes the string to contain the given standard ASCII string value. | |
EXTRTMETHOD | OSRTString (const OSUTF8CHAR *strval) |
This constructor initializes the string to contain the given UTF-8 string value. | |
EXTRTMETHOD | OSRTString (const OSRTString &str) |
Copy constructor. | |
virtual EXTRTMETHOD | ~OSRTString () |
The destructor frees string memory using the standard 'delete' operator. | |
virtual OSRTStringIF * | clone () |
This method creates a copy of the given string object. | |
virtual const char * | getValue () const |
This method returns the pointer to UTF-8 null terminated string as a standard ASCII string. | |
virtual const OSUTF8CHAR * | getUTF8Value () const |
This method returns the pointer to UTF-8 null terminated string as a UTF-8 string. | |
virtual void | print (const char *name) |
This method prints the string value to standard output. | |
virtual EXTRTMETHOD void | setValue (const char *str) |
This method sets the string value to the given string. | |
virtual EXTRTMETHOD void | setValue (const OSUTF8CHAR *str) |
This method sets the string value to the given UTF-8 string value. | |
EXTRTMETHOD OSRTString & | operator= (const OSRTString &original) |
Assignment operator. | |
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.
Definition at line 49 of file OSRTString.h.
Constructor & Destructor Documentation
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.
Member Function Documentation
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.
Implements OSRTStringIF.
Definition at line 114 of file OSRTString.h.
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.
Implements OSRTStringIF.
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.
Implements OSRTStringIF.
The documentation for this class was generated from the following file: