Hide menu
Loading...
Searching...
No Matches
cadex::Base_UTF16String Class Reference

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

#include <cadex/Base_UTF16String.hxx>

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.
 
 Base_UTF16String (const Base_UTF16String &theOther)
 Constructor.
 
 Base_UTF16String (Base_UTF16String &&theOther)
 Constructor.
 
 Base_UTF16String (const char *theOther)
 Constructor.
 
 Base_UTF16String (const UTF16 *theOther)
 Constructor.
 
 Base_UTF16String (const UTF16 *theOther, size_t theLength)
 Constructor.
 
 Base_UTF16String (const wchar_t *theOther)
 Constructor.
 
 Base_UTF16String (const value_type &theOther)
 Constructor.
 
 Base_UTF16String (const TCollection_AsciiString &theOther)
 Constructor.
 
 Base_UTF16String (const TCollection_ExtendedString &theOther)
 Constructor.
 
 Base_UTF16String (const std::wstring &theOther)
 Constructor.
 
 Base_UTF16String (const Base_String &theOther)
 Constructor.
 
 Base_UTF16String (const std::basic_string< char, std::char_traits< char >, Base_Allocator< char > > &theOther)
 Constructor.
 
 ~Base_UTF16String ()
 Destructor.
 
const value_typeString () const
 Returns an internal string representation.
 
value_typeString ()
 Returns an internal string representation.
 
const UTF16Data () const
 Returns an internal string buffer.
 
TCollection_ExtendedString ToExtendedString () const
 Converts to another Unicode representation.
 
void Clear ()
 Clears the contents.
 
Base_String ToUTF8 () const
 Converts to UTF-8 string.
 
std::wstring ToWString () const
 Converts to standard wstring.
 
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.
 
Base_UTF16Stringoperator= (const Base_UTF16String &theOther)
 Assignment operator.
 
Base_UTF16Stringoperator= (Base_UTF16String &&theOther)
 Assignment operator.
 
Base_UTF16Stringoperator= (const char *theOther)
 Assignment operator.
 
Base_UTF16Stringoperator= (const UTF16 *theOther)
 Assignment operator.
 
Base_UTF16Stringoperator= (const value_type &theOther)
 Assignment operator.
 
Base_UTF16Stringoperator= (const TCollection_AsciiString &theOther)
 Assignment operator.
 
Base_UTF16Stringoperator= (const TCollection_ExtendedString &theOther)
 Assignment operator.
 
Base_UTF16Stringoperator= (const std::wstring &theOther)
 Assignment operator.
 
Base_UTF16Stringoperator= (const Base_String &theOther)
 Assignment operator.
 
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
Eyeshot/conversion/MainForm.cs, MTKConverter/Program.cs, MTKConverter/main.cxx, Unigine/source/ModelImporter.cpp, Unity/Assets/Scripts/ModelImporter.cs, advgeom/brepsimplify/Program.cs, advgeom/meshsimplify/Program.cs, bim/exploring/Program.cs, conversion/cdxwebconverter/Program.cs, conversion/export/Program.cs, conversion/import/Program.cs, conversion/screenshot/Program.cs, conversion/transfer/Program.cs, conversion/transferparams/Program.cs, exploring/appearance/Program.cs, exploring/bom/Program.cs, exploring/bom/main.cxx, exploring/brepgeometry/Program.cs, exploring/breprepresentation/Program.cs, exploring/configurations/Program.cs, exploring/drawings/Program.cs, exploring/drawings/main.cxx, exploring/layers/Program.cs, exploring/pmi/Program.cs, exploring/pmi/main.cxx, exploring/polyrepresentation/Program.cs, exploring/propertytable/Program.cs, exploring/propertytable/main.cxx, exploring/transformations/Program.cs, exploring/transformations/main.cxx, helpers/shape_processor.cs, helpers/shape_processor.hxx, machining/dfm_analyzer/Program.cs, machining/dfm_analyzer/main.cxx, machining/feature_recognizer/Program.cs, machining/feature_recognizer/main.cxx, meshing/lods/Program.cs, meshing/mefisto/Program.cs, meshing/netgen/Program.cs, meshing/remeshing/Program.cs, meshing/visualizationmesher/Program.cs, misc/logging/Program.cs, misc/progressindicator/Program.cs, misc/progressindicatorgui/main.cxx, modeling/assembly/Program.cs, modeling/brep/Program.cs, modeling/brep/main.cxx, modeling/brepfeatures/Program.cs, modeling/brepprimitives/Program.cs, modeling/elementremoval/Program.cs, modeling/elementremoval/main.cxx, modeling/metadata/Program.cs, modeling/poly/Program.cs, modification/coloring/Program.cs, modification/renaming/Program.cs, modification/renaming/main.cxx, modification/rotation/Program.cs, sheet_metal/dfm_analyzer/Program.cs, sheet_metal/dfm_analyzer/main.cxx, sheet_metal/feature_recognizer/Program.cs, sheet_metal/feature_recognizer/main.cxx, sheet_metal/unfolder/Program.cs, sheet_metal/unfolder/main.cxx, visualization/offscreen/Program.cs, visualization/qtquick_qml/selectionhandling/main.cxx, visualization/winforms/baseviewer/Program.cs, visualization/wpf/baseviewer/App.xaml.cs, wall_thickness/analyzer/Program.cs, wall_thickness/analyzer/main.cxx, wall_thickness/visualization/Program.cs, and wall_thickness/visualization/main.cxx.

Constructor & Destructor Documentation

◆ Base_UTF16String() [1/13]

cadex::Base_UTF16String::Base_UTF16String ( )

Constructor.

Creates an empty string.

◆ Base_UTF16String() [2/13]

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

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [3/13]

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

Constructor.

Moves contents from another string.

◆ Base_UTF16String() [4/13]

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

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [5/13]

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

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [6/13]

cadex::Base_UTF16String::Base_UTF16String ( const UTF16 theOther,
size_t  theLength 
)

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [7/13]

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

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [8/13]

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() [9/13]

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

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [10/13]

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

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [11/13]

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() [12/13]

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

Constructor.

Copies contents from another string.

◆ Base_UTF16String() [13/13]

cadex::Base_UTF16String::Base_UTF16String ( const std::basic_string< char, std::char_traits< char >, Base_Allocator< char > > &  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

◆ Clear()

void cadex::Base_UTF16String::Clear ( )

Clears the contents.

IsEmpty() will return true after calling this method.

◆ IsEmpty()

◆ operator=() [1/9]

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

Assignment operator.

Copies contents from another string.

◆ operator=() [2/9]

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

Assignment operator.

Copies contents from another string.

◆ operator=() [3/9]

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

Assignment operator.

Copies contents from another string.

◆ operator=() [4/9]

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

Assignment operator.

Copies contents from another string.

◆ operator=() [5/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=() [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 UTF16 theOther)

Assignment operator.

Copies contents from another string.

◆ operator=() [9/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.

◆ 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.