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. More... | |
NXStringMode | GetMode () const |
Returns the mode that was used to create this string. More... | |
const char * | GetText () const |
Returns the text that was passed into the constructor. More... | |
const char * | GetUTF8Text () const |
Returns the text in UTF_8 encoding. More... | |
NXString (const char *text, NXStringMode mode=Locale) | |
Creates an NXString from an encoded character array. More... | |
NXString (const std::string &text, NXStringMode mode=Locale) | |
Creates an NXString from a std:string. More... | |
NXString (const NXString &other) | |
Copy constructor. More... | |
NXString & | operator+= (const char *s) |
Append the argument to this string. More... | |
NXString & | operator+= (const NXString &s) |
Append the argument to this string. More... | |
NXString & | operator= (const NXString &other) |
Assignment operator. More... | |
~NXString () | |
NXString destructor. More... | |
Public Attributes | |
NXStringMode | const |
Identical to GetMode() but with old name. More... | |
const | const |
Identical to GetText() but with old name. More... | |
Friends | |
NXOPENCPPEXPORT NXString | operator+ (const NXString &a, const char *b) |
Concatenate two strings. More... | |
NXOPENCPPEXPORT NXString | operator+ (const char *a, const NXString &b) |
Concatenate two strings. More... | |
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 | ( | ) |
NXString destructor.
const char* NXOpen::NXString::GetLocaleText | ( | ) | const |
Returns the text in the encoding supported by the current locale.
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.
const char* NXOpen::NXString::GetText | ( | ) | const |
Returns the text that was passed into the constructor.
const char* NXOpen::NXString::GetUTF8Text | ( | ) | const |
Returns the text in UTF_8 encoding.
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.
Concatenate two strings.
The second argument is treated as text in the current locale. The return value is a string of the same mode as the first argument
Concatenate two strings.
The first argument is treated as text in the current locale. The return value is a string of the same mode as the second argument
const NXOpen::NXString::const |
Identical to GetMode() but with old name.
Identical to GetUTF8Text() but with old name.
Identical to GetLocaleText() but with old name.
Deprecated.
const NXOpen::NXString::const |
Identical to GetText() but with old name.
Identical to GetUTF8Text() but with old name.
Identical to GetLocaleText() but with old name.
Deprecated.