- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# osgText::String Class Reference

Inheritance diagram for osgText::String:

[legend]
List of all members.

## Public Types
enum | Encoding { ENCODING_UNDEFINED, ENCODING_ASCII = ENCODING_UNDEFINED, ENCODING_UTF8, ENCODING_UTF16, ENCODING_UTF16_BE, ENCODING_UTF16_LE, ENCODING_UTF32, ENCODING_UTF32_BE, ENCODING_UTF32_LE, ENCODING_SIGNATURE }
| Types of string encodings supported. More...
## Public Member Functions
| String ()
| String (const String &str)
| String (const std::string &str)
| String (const wchar_t *text)
| String (const std::string &text, Encoding encoding)
virtual | ~String ()
String & | operator= (const String &str)
void | set (const std::string &str)
void | set (const wchar_t *text)
| Set the text using a wchar_t string, which is converted to an internal TextString.
void | set (const std::string &text, Encoding encoding)
| Set the text using a Unicode encoded std::string, which is converted to an internal TextString.
std::string | createUTF8EncodedString () const
| returns a UTF8 encoded version of this osgText::String.

## Member Enumeration Documentation

enum osgText::String::Encoding

  | Types of string encodings supported. Enumerator:
  ENCODING_UNDEFINED |
  ENCODING_ASCII | not using Unicode
  ENCODING_UTF8 | unsigned char ASCII
  ENCODING_UTF16 | 8-bit unicode transformation format
  ENCODING_UTF16_BE | 16-bit signature
  ENCODING_UTF16_LE | 16-bit big-endian
  ENCODING_UTF32 | 16-bit little-endian
  ENCODING_UTF32_BE | 32-bit signature
  ENCODING_UTF32_LE | 32-bit big-endian
  ENCODING_SIGNATURE | detect encoding from signature

## Constructor & Destructor Documentation

osgText::String::String | ( |  | ) | `[inline]`

String::String | ( | const String & | str | ) |

osgText::String::String | ( | const std::string & | str | ) | `[inline]`

osgText::String::String | ( | const wchar_t * | text | ) | `[inline]`

osgText::String::String | ( | const std::string & | text,
|  | Encoding | encoding
| ) | `[inline]`

virtual osgText::String::~String | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

std::string String::createUTF8EncodedString | ( |  | ) | const

| returns a UTF8 encoded version of this osgText::String.

String & String::operator= | ( | const String & | str | ) |

void String::set | ( | const std::string & | text,
|  | Encoding | encoding
| ) |

| Set the text using a Unicode encoded std::string, which is converted to an internal TextString. The encoding parameter specificies which Unicode encodeding is used in the std::string.

void String::set | ( | const wchar_t * | text | ) |

| Set the text using a wchar_t string, which is converted to an internal TextString.

void String::set | ( | const std::string & | str | ) |

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

- String
- String.cpp