Wraps standard string. More...
#include <Base_String.hxx>
Public Types | |
typedef std::basic_string< char, std::char_traits< char >, Base_Allocator< char > > | value_type |
Defines a type of a standard string with CAD Exchanger allocator. | |
Public Member Functions | |
Base_String () | |
Constructor. | |
Base_String (const Base_String &theOther) | |
Constructor. | |
Base_String (const char *theOther) | |
Constructor. | |
Base_String (const Base_UTF16String &theOther) | |
Constructor. | |
Base_String (const UTF16 *theOther) | |
Constructor. | |
Base_String (const value_type &theOther) | |
Constructor. | |
Base_String (const std::string &theOther) | |
Constructor. | |
Base_String (const TCollection_AsciiString &theOther) | |
Constructor. | |
Base_String (const TCollection_ExtendedString &theOther) | |
Constructor. | |
~Base_String () | |
Destructor. | |
const value_type & | String () const |
Returns an internal string representation. | |
value_type & | String () |
Returns an internal string representation. | |
void | Clear () |
Clears the contents. | |
const char * | Data () const |
Returns an internal string buffer. | |
bool | operator== (const Base_String &theOther) const |
Returns true if this equals theOther. | |
bool | operator== (const char *theOther) const |
Returns true if this equals theOther. | |
bool | operator!= (const Base_String &theOther) const |
Returns true if this does equal theOther. | |
bool | operator!= (const char *theOther) const |
Returns true if this does equal theOther. | |
size_t | Length () const |
Returns a string length in bytes. | |
bool | IsEmpty () const |
Returns true if the string is empty. | |
Base_String & | operator= (const Base_String &theOther) |
Assignment operator. | |
Base_String & | operator= (const char *theOther) |
Assignment operator. | |
Base_String & | operator= (const Base_UTF16String &theOther) |
Assignment operator. | |
Base_String & | operator= (const UTF16 *theOther) |
Assignment operator. | |
Base_String & | operator= (const std::string &theOther) |
Assignment operator. | |
Base_String & | operator= (const value_type &theOther) |
Assignment operator. | |
Base_String & | operator= (const TCollection_AsciiString &theOther) |
Assignment operator. | |
Base_String & | operator= (const TCollection_ExtendedString &theOther) |
Assignment operator. | |
Wraps standard string.
cadex::Base_String::Base_String | ( | ) |
Constructor.
Creates an empty string.
cadex::Base_String::Base_String | ( | const Base_String & | theOther | ) |
Constructor.
Copies contents from another string.
|
explicit |
Constructor.
Copies contents from another string.
cadex::Base_String::Base_String | ( | const Base_UTF16String & | theOther | ) |
Constructor.
Converts the UTF16 string theOther to UTF8.
|
explicit |
Constructor.
Copies contents from another string.
|
explicit |
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.
|
explicit |
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.
|
explicit |
Constructor.
Copies contents from another string.
|
explicit |
Constructor.
Copies contents from another string.
cadex::Base_String::~Base_String | ( | ) |
Destructor.
Destroys the object and frees all allocated resources.
void cadex::Base_String::Clear | ( | ) |
Clears the contents.
IsEmpty() will return true after calling this method.
bool cadex::Base_String::IsEmpty | ( | ) | const |
Returns true if the string is empty.
Returns true if the string length equals 0.
size_t cadex::Base_String::Length | ( | ) | const |
Returns a string length in bytes.
As the string is in UTF-8 encoding the number of valuable characters can be smaller.
Base_String & cadex::Base_String::operator= | ( | const Base_String & | theOther | ) |
Assignment operator.
Copies contents from another string.
Base_String & cadex::Base_String::operator= | ( | const Base_UTF16String & | theOther | ) |
Assignment operator.
Copies contents from another string. Converts the UTF16 string theOther to UTF8.
Base_String & cadex::Base_String::operator= | ( | const char * | theOther | ) |
Assignment operator.
Copies contents from another string.
Base_String & cadex::Base_String::operator= | ( | const std::string & | 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.
Base_String & cadex::Base_String::operator= | ( | const TCollection_AsciiString & | theOther | ) |
Assignment operator.
Copies contents from another string.
Base_String & cadex::Base_String::operator= | ( | const TCollection_ExtendedString & | theOther | ) |
Assignment operator.
Copies contents from another string.
Base_String & cadex::Base_String::operator= | ( | const UTF16 * | theOther | ) |
Assignment operator.
Copies contents from another string.
Base_String & cadex::Base_String::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.