NX Open C++ Reference Guide
|
An internationalized NX text string. More...
Public Types | |
enum | NXStringMode { UTF8, Locale } |
Specifies the language mode. More... | |
Public Member Functions | |
const char * | GetLocaleText () const |
Returns the text in the encoding supported by the current locale. | |
const char * | getLocaleText () const |
Identical to GetLocaleText() but with old name. | |
NXStringMode | GetMode () const |
Returns the mode that was used to create this string. | |
NXStringMode | getMode () const |
Identical to GetMode() but with old name. | |
const char * | GetText () const |
Returns the text that was passed into the constructor. | |
const char * | getText () const |
Identical to GetText() but with old name. | |
const char * | GetUTF8Text () const |
Returns the text in UTF_8 encoding. | |
const char * | getUTF8Text () const |
Identical to GetUTF8Text() but with old name. | |
NXString (const char *text, NXStringMode mode=Locale) | |
Creates an NXString from an encoded character array. | |
NXString (const std::string &text, NXStringMode mode=Locale) | |
Creates an NXString from a std:string. | |
NXString (const NXString &other) | |
Copy constructor. | |
NXString & | operator+= (const char *s) |
Append the argument to this string. | |
NXString & | operator+= (const NXString &s) |
Append the argument to this string. | |
NXString & | operator= (const NXString &other) |
Assignment operator. | |
~NXString () | |
NXString destructor. | |
An internationalized NX text string.
NXOpen::NXString::NXString | ( | const char * | text, |
NXStringMode | mode = Locale |
||
) |
Creates an NXString from an encoded character array.
If mode == NXStringUTF8, the character array is assumed to be UTF8. If mode == NXStringLocale, the character array is assumed to be in the current locale's encoding.
NXOpen::NXString::NXString | ( | const std::string & | text, |
NXStringMode | mode = Locale |
||
) |
Creates an NXString from a std:string.
If mode == NXStringUTF8, the string is assumed to be UTF8. If mode == NXStringLocale, the string is assumed to be in the current locale's encoding.
NXOpen::NXString::NXString | ( | const NXString & | other | ) |
Copy constructor.
NXOpen::NXString::~NXString | ( | ) |
NXString destructor.
const char* NXOpen::NXString::GetLocaleText | ( | ) | const |
Returns the text in the encoding supported by the current locale.
const char* NXOpen::NXString::getLocaleText | ( | ) | const |
Identical to GetLocaleText() but with old name.
Deprecated.
NXStringMode NXOpen::NXString::GetMode | ( | ) | const |
Returns the mode that was used to create this string.
NXString objects returned from the NX API will have the mode set according to the underlying implementation. This if a member-funtion GetName() returns an NXString in NXStringLocale mode, the underlying name is stored in a locale-specific encoding. If the string is returned in NXStringUTF8 mode, the underlying name is stored internally in UTF8 mode.
NXStringMode NXOpen::NXString::getMode | ( | ) | const |
Identical to GetMode() but with old name.
Deprecated.
const char* NXOpen::NXString::GetText | ( | ) | const |
Returns the text that was passed into the constructor.
const char* NXOpen::NXString::getText | ( | ) | const |
Identical to GetText() but with old name.
Deprecated.
const char* NXOpen::NXString::GetUTF8Text | ( | ) | const |
Returns the text in UTF_8 encoding.
const char* NXOpen::NXString::getUTF8Text | ( | ) | const |
Identical to GetUTF8Text() but with old name.
Deprecated.
NXString& NXOpen::NXString::operator+= | ( | const char * | s | ) |
Append the argument to this string.
The argument is treated as text in the current locale.
Append the argument to this string.
This string stays in the same mode. If this string is in locale mode and the argument is a UTF8 string then the result may lose characters that can not be represented in the current locale.