NX Open C++ Reference Guide
|
An internationalized NX text string. More...
Public Types | |
enum | NXStringMode { UTF8, Locale, Unknown, AssumedLocale, AssumedUTF8 } |
Specifies the language mode. More... | |
Public Member Functions | |
const char * | GetLocaleText () const |
Returns the text in the encoding supported by the current locale. More... | |
const char * | getLocaleText () const |
Identical to GetLocaleText() but with old name. More... | |
NXStringMode | GetMode () const |
Returns the mode that was used to create this string. More... | |
NXStringMode | getMode () const |
Identical to GetMode() but with old name. More... | |
const char * | GetText () const |
Returns the text that was passed into the constructor. More... | |
const char * | getText () const |
Identical to GetText() but with old name. More... | |
const char * | GetUTF8Text () const |
Returns the text in UTF_8 encoding. More... | |
const char * | getUTF8Text () const |
Identical to GetUTF8Text() but with old name. More... | |
NXString (const char *text, NXStringMode mode=Unknown) | |
Creates an NXString from an encoded character array. More... | |
NXString (const std::string &text, NXStringMode mode=Unknown) | |
<DEL>@ More... | |
NXString (const NXString &other) | |
<DEL>@ 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... | |
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 = Unknown |
||
) |
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. <DEL>@ <Keith hafen>=""> 27-Jul-2013 With NX running in UTF8 mode, the default char * constructor is wrong. For internal code the default should be Unknown, so the constructor figures it out from the data passed in.
NXOpen::NXString::NXString | ( | const std::string & | text, |
NXStringMode | mode = Unknown |
||
) |
<DEL>@
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. <DEL>@ <Keith hafen>=""> 27-Jul-2013 With NX running in UTF8 mode, the default char * constructor is wrong. For internal code the default should be Unknown, so the constructor figures it out from the data passed in.
NXOpen::NXString::NXString | ( | const NXString & | other | ) |
<DEL>@
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.
Append the argument to this string.
The argument is treated as text in the current locale. <DEL>@ <DEL>@ 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