CAD Exchanger SDK
cadex::Base_String Class Reference

Wraps standard string. More...

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. More...
 
 Base_String (const Base_String &theOther)
 Constructor. More...
 
 Base_String (const char *theOther)
 Constructor. More...
 
 Base_String (const UTF16 *theOther)
 Constructor. More...
 
 Base_String (const value_type &theOther)
 Constructor. More...
 
 Base_String (const std::string &theOther)
 Constructor. More...
 
 Base_String (const TCollection_AsciiString &theOther)
 Constructor. More...
 
 Base_String (const TCollection_ExtendedString &theOther)
 Constructor. More...
 
 ~Base_String ()
 Destructor. More...
 
const value_typeString () const
 Returns an internal string representation.
 
value_typeString ()
 Returns an internal string representation.
 
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 Base_String &theOther) const
 Returns true if this does equal theOther.
 
size_t Length () const
 Returns a string length in bytes. More...
 
bool IsEmpty () const
 Returns true if the string is empty. More...
 
Base_Stringoperator= (const Base_String &theOther)
 Assignment operator. More...
 
Base_Stringoperator= (const char *theOther)
 Assignment operator. More...
 
Base_Stringoperator= (const UTF16 *theOther)
 Assignment operator. More...
 
Base_Stringoperator= (const std::string &theOther)
 Assignment operator. More...
 
Base_Stringoperator= (const value_type &theOther)
 Assignment operator. More...
 
Base_Stringoperator= (const TCollection_AsciiString &theOther)
 Assignment operator. More...
 
Base_Stringoperator= (const TCollection_ExtendedString &theOther)
 Assignment operator. More...
 

Detailed Description

Wraps standard string.

Constructor & Destructor Documentation

◆ Base_String() [1/8]

cadex::Base_String::Base_String ( )

Constructor.

Creates an empty string.

◆ Base_String() [2/8]

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

Constructor.

Copies contents from another string.

◆ Base_String() [3/8]

cadex::Base_String::Base_String ( const char *  theOther)
explicit

Constructor.

Copies contents from another string.

◆ Base_String() [4/8]

cadex::Base_String::Base_String ( const UTF16 theOther)
explicit

Constructor.

Copies contents from another string.

◆ Base_String() [5/8]

cadex::Base_String::Base_String ( const value_type theOther)
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.

◆ Base_String() [6/8]

cadex::Base_String::Base_String ( const std::string &  theOther)
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.

◆ Base_String() [7/8]

cadex::Base_String::Base_String ( const TCollection_AsciiString &  theOther)
explicit

Constructor.

Copies contents from another string.

◆ Base_String() [8/8]

cadex::Base_String::Base_String ( const TCollection_ExtendedString &  theOther)
explicit

Constructor.

Copies contents from another string.

◆ ~Base_String()

cadex::Base_String::~Base_String ( )

Destructor.

Destroys the object and frees all allocated resources.

Member Function Documentation

◆ IsEmpty()

bool cadex::Base_String::IsEmpty ( ) const

Returns true if the string is empty.

Returns true if the string length equals 0.

◆ Length()

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.

◆ operator=() [1/7]

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

Assignment operator.

Copies contents from another string.

◆ operator=() [2/7]

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

Assignment operator.

Copies contents from another string.

◆ operator=() [3/7]

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

Assignment operator.

Copies contents from another string.

◆ operator=() [4/7]

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.

◆ operator=() [5/7]

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.

◆ operator=() [6/7]

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

Assignment operator.

Copies contents from another string.

◆ operator=() [7/7]

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

Assignment operator.

Copies contents from another string.