OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
osgText::String Class Reference

#include <String.h>

Inheritance diagram for osgText::String:
Inheritance graph
[legend]
Collaboration diagram for osgText::String:
Collaboration graph
[legend]

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
}
 
typedef VectorUInt vector_type
 

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)
 
Stringoperator= (const String &str)
 
void set (const std::string &str)
 
void set (const wchar_t *text)
 
void set (const std::string &text, Encoding encoding)
 
std::string createUTF8EncodedString () const
 
- Public Member Functions inherited from osgText::VectorUInt
 VectorUInt ()
 
 VectorUInt (const VectorUInt &copy)
 
 VectorUInt (unsigned int *beg, unsigned int *end)
 
 VectorUInt (unsigned int n)
 

Detailed Description

Definition at line 43 of file String.h.

Member Typedef Documentation

Definition at line 47 of file String.h.

Member Enumeration Documentation

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 

32-bit little-endian

detect encoding from signature

Definition at line 52 of file String.h.

Constructor & Destructor Documentation

osgText::String::String ( )
inline

Definition at line 67 of file String.h.

osgText::String::String ( const String str)
osgText::String::String ( const std::string &  str)
inline

Definition at line 69 of file String.h.

osgText::String::String ( const wchar_t *  text)
inline

Definition at line 70 of file String.h.

osgText::String::String ( const std::string &  text,
Encoding  encoding 
)
inline

Definition at line 71 of file String.h.

Member Function Documentation

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

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

String& osgText::String::operator= ( const String str)
void osgText::String::set ( const std::string &  str)
void osgText::String::set ( const wchar_t *  text)

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

void osgText::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 specifies which Unicode encoding is used in the std::string.


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