CAD Exchanger SDK
cadex::Base_UTF16String Class Reference

Defines a Unicode (UTF-16) string wrapping a standard string. More...

Public Types

typedef UTF16 ValueType
 Defines a type of a standard string with CAD Exchanger allocator.
 
typedef std::basic_string< ValueType, std::char_traits< ValueType >, Base_Allocator< ValueType > > value_type
 Defines a type of a standard string with CAD Exchanger allocator.
 

Public Member Functions

 Base_UTF16String ()
 Constructor. More...
 
 Base_UTF16String (const Base_UTF16String &theOther)
 Constructor. More...
 
 Base_UTF16String (Base_UTF16String &&theOther)
 Constructor. More...
 
 Base_UTF16String (const char *theOther)
 Constructor. More...
 
 Base_UTF16String (const UTF16 *theOther)
 Constructor. More...
 
 Base_UTF16String (const wchar_t *theOther)
 Constructor. More...
 
 Base_UTF16String (const value_type &theOther)
 Constructor. More...
 
 Base_UTF16String (const TCollection_AsciiString &theOther)
 Constructor. More...
 
 Base_UTF16String (const TCollection_ExtendedString &theOther)
 Constructor. More...
 
 Base_UTF16String (const std::wstring &theOther)
 Constructor. More...
 
 Base_UTF16String (const Base_String &theOther)
 Constructor. More...
 
 ~Base_UTF16String ()
 Destructor. More...
 
const value_typeString () const
 Returns an internal string representation.
 
value_typeString ()
 Returns an internal string representation.
 
const ValueTypeData () const
 Returns an internal string buffer.
 
TCollection_ExtendedString ToExtendedString () const
 Converts to another Unicode representation.
 
Base_String ToUTF8 () const
 Converts to UTF-8 string.
 
std::wstring ToWString () const
 Converts to standard wstring. More...
 
bool operator== (const Base_UTF16String &theOther) const
 Returns true if this equals theOther.
 
bool operator!= (const Base_UTF16String &theOther) const
 Returns true if this does equal theOther.
 
size_t Length () const
 Returns a string length in UTF16 characters.
 
bool IsEmpty () const
 Returns true if the string is empty. More...
 
Base_UTF16Stringoperator= (const Base_UTF16String &theOther)
 Assignment operator. More...
 
Base_UTF16Stringoperator= (Base_UTF16String &&theOther)
 Assignment operator. More...
 
Base_UTF16Stringoperator= (const char *theOther)
 Assignment operator. More...
 
Base_UTF16Stringoperator= (const UTF16 *theOther)
 Assignment operator. More...
 
Base_UTF16Stringoperator= (const value_type &theOther)
 Assignment operator. More...
 
Base_UTF16Stringoperator= (const TCollection_AsciiString &theOther)
 Assignment operator. More...
 
Base_UTF16Stringoperator= (const TCollection_ExtendedString &theOther)
 Assignment operator. More...
 
Base_UTF16Stringoperator= (const std::wstring &theOther)
 Assignment operator. More...
 
Base_UTF16Stringoperator= (const Base_String &theOther)
 Assignment operator. More...
 
Base_UTF16String operator+ (const Base_UTF16String &theOther) const
 '+' operator.
 
Base_UTF16Stringoperator+= (const Base_UTF16String &theOther)
 Concatenate operator.
 
 operator TCollection_ExtendedString () const
 Converts to another Unicode representation.
 

Detailed Description

Defines a Unicode (UTF-16) string wrapping a standard string.

Examples:
modelexplorer/main.cxx.

Constructor & Destructor Documentation

◆ Base_UTF16String() [1/11]

cadex::Base_UTF16String::Base_UTF16String ( )

Constructor.

Creates an empty string.

◆ Base_UTF16String() [2/11]

cadex::Base_UTF16String::Base_UTF16String ( const Base_UTF16String theOther)

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [3/11]

cadex::Base_UTF16String::Base_UTF16String ( Base_UTF16String &&  theOther)

Constructor.

Moves contents from another string.

◆ Base_UTF16String() [4/11]

cadex::Base_UTF16String::Base_UTF16String ( const char *  theOther)

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [5/11]

cadex::Base_UTF16String::Base_UTF16String ( const UTF16 theOther)

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [6/11]

cadex::Base_UTF16String::Base_UTF16String ( const wchar_t *  theOther)

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [7/11]

cadex::Base_UTF16String::Base_UTF16String ( const value_type theOther)

Constructor.

Copies contents from another string. This syntax may only be used if the build environment (i.e. compiler versions and flags) of the customer fully matches one of CAD Exchanger. Otherwise syntax with plain pointers should be used.

◆ Base_UTF16String() [8/11]

cadex::Base_UTF16String::Base_UTF16String ( const TCollection_AsciiString &  theOther)

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [9/11]

cadex::Base_UTF16String::Base_UTF16String ( const TCollection_ExtendedString &  theOther)

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [10/11]

cadex::Base_UTF16String::Base_UTF16String ( const std::wstring &  theOther)

Constructor.

Copies contents from another string.

Note
in C# accepts a native string type, in Java - a native String type.
See also
ToWString().

◆ Base_UTF16String() [11/11]

cadex::Base_UTF16String::Base_UTF16String ( const Base_String theOther)

Constructor.

Copies contents from another string.

◆ ~Base_UTF16String()

cadex::Base_UTF16String::~Base_UTF16String ( )

Destructor.

Destroys the object and frees all allocated resources.

Member Function Documentation

◆ IsEmpty()

bool cadex::Base_UTF16String::IsEmpty ( ) const

Returns true if the string is empty.

Returns true if the string length equals 0.

Examples:
modelexplorer/main.cxx.

◆ operator=() [1/9]

Base_UTF16String & cadex::Base_UTF16String::operator= ( const Base_UTF16String theOther)

Assignment operator.

Copies contents from another string.

◆ operator=() [2/9]

Base_UTF16String & cadex::Base_UTF16String::operator= ( Base_UTF16String &&  theOther)

Assignment operator.

Copies contents from another string.

◆ operator=() [3/9]

Base_UTF16String & cadex::Base_UTF16String::operator= ( const char *  theOther)

Assignment operator.

Copies contents from another string.

◆ operator=() [4/9]

Base_UTF16String & cadex::Base_UTF16String::operator= ( const UTF16 theOther)

Assignment operator.

Copies contents from another string.

◆ operator=() [5/9]

Base_UTF16String & cadex::Base_UTF16String::operator= ( const value_type theOther)

Assignment operator.

Copies contents from another string. This syntax may only be used if the build environment (i.e. compiler versions and flags) of the customer fully matches one of CAD Exchanger. Otherwise syntax with plain pointers should be used.

◆ operator=() [6/9]

Base_UTF16String & cadex::Base_UTF16String::operator= ( const TCollection_AsciiString &  theOther)

Assignment operator.

Copies contents from another string.

◆ operator=() [7/9]

Base_UTF16String & cadex::Base_UTF16String::operator= ( const TCollection_ExtendedString &  theOther)

Assignment operator.

Copies contents from another string.

◆ operator=() [8/9]

Base_UTF16String & cadex::Base_UTF16String::operator= ( const std::wstring &  theOther)

Assignment operator.

Copies contents from another string. This syntax may only be used if the build environment (i.e. compiler versions and flags) of the customer fully matches one of CAD Exchanger. Otherwise syntax with plain pointers should be used.

◆ operator=() [9/9]

Base_UTF16String & cadex::Base_UTF16String::operator= ( const Base_String theOther)

Assignment operator.

Copies contents from another string.

◆ ToWString()

std::wstring cadex::Base_UTF16String::ToWString ( ) const

Converts to standard wstring.

Note
in C# converts to native string type, in Java - to native String type.