cgul_string_cxx Class Reference

C++ bindings for cgul_string More...

#include <cgul_string_cxx.h>

Collaboration diagram for cgul_string_cxx:
Collaboration graph

Public Member Functions

 cgul_string_cxx ()
 
 cgul_string_cxx (const cgul_string_cxx &rhs)
 
 cgul_string_cxx (const char *rhs)
 
virtual ~cgul_string_cxx ()
 
virtual cgul_string_cxxoperator= (const cgul_string_cxx &rhs)
 
virtual cgul_string_cxxoperator= (const char *rhs)
 
virtual cgul_string_cxxoperator+= (const cgul_string_cxx &rhs)
 
virtual cgul_string_cxxoperator+= (const char *rhs)
 
virtual char & operator[] (size_t index)
 
virtual const char & operator[] (size_t index) const
 
virtual operator char * () const
 
virtual int operator== (const cgul_string_cxx &rhs) const
 
virtual int operator< (const cgul_string_cxx &rhs) const
 
virtual int operator<= (const cgul_string_cxx &rhs) const
 
virtual int operator> (const cgul_string_cxx &rhs) const
 
virtual int operator>= (const cgul_string_cxx &rhs) const
 
virtual char * get_value () const
 
virtual char * take_value ()
 
virtual void set_value (const char *value)
 
virtual char get_value_at (size_t index) const
 
virtual void set_value_at (size_t index, char c)
 
virtual void clear ()
 
virtual signed char to_schar (int base=0) const
 
virtual unsigned char to_uchar (int base=0) const
 
virtual short int to_short (int base=0) const
 
virtual unsigned short int to_ushort (int base=0) const
 
virtual int to_int (int base=0) const
 
virtual unsigned int to_unsigned (int base=0) const
 
virtual long int to_long (int base=0) const
 
virtual unsigned long int to_unsigned_long (int base=0) const
 
virtual double to_double () const
 
virtual void append (const char *value)
 
virtual void append_block (const void *block, size_t block_size)
 
virtual int append_sprintf (const char *format,...)
 
virtual int append_vsprintf (const char *format, va_list args)
 
virtual void append_char (char c)
 
virtual void append_hchar (cgul_hchar_t *utf16, size_t utf16_length)
 
virtual void append_wchar (cgul_wchar_t utf32)
 
virtual void append_decimal (long int value)
 
virtual void append_unsigned_decimal (size_t value)
 
virtual void append_octal (size_t value)
 
virtual void append_hexadecimal (size_t value, int caps)
 
virtual void append_double (double value, int precision)
 
virtual void append_pointer (const void *ptr)
 
virtual void insert (size_t index, const char *value, size_t value_length)
 
virtual void insert_char (size_t index, char value)
 
virtual void pad_right (size_t width, char pad)
 
virtual void pad_left (size_t width, char pad)
 
virtual void trim ()
 
virtual void trim_left ()
 
virtual void trim_right ()
 
virtual void reverse ()
 
virtual size_t get_length () const
 
virtual size_t set_length (size_t length)
 
virtual void externally_adjusted ()
 
virtual void trim_capacity ()
 
virtual size_t get_minimum_capacity () const
 
virtual void set_minimum_capacity (size_t minimum_capacity)
 
virtual int compare (const cgul_string_cxx &rhs) const
 
virtual int icompare (const cgul_string_cxx &rhs) const
 
virtual void swap (cgul_string_cxx &rhs)
 
virtual cgul_string_t get_obj () const
 
virtual cgul_string_t take_obj ()
 
virtual void set_obj (cgul_string_t rhs)
 

Detailed Description

This class provides the C++ bindings for C cgul_string objects. The main purpose of this class is to convert the C-style function calls and exception handling in cgul_string into C++-style function calls and exception handling.

Constructor & Destructor Documentation

§ cgul_string_cxx() [1/3]

cgul_string_cxx::cgul_string_cxx ( )
inline

Default constructor that creates a new instance with an empty string.

References cgul_string__new().

§ cgul_string_cxx() [2/3]

cgul_string_cxx::cgul_string_cxx ( const cgul_string_cxx rhs)
inline

Copy constructor that creates a new instance by copying the value from rhs.

Parameters
[in]rhsright-hand side

References cgul_string__new_from_cstring(), and get_value().

§ cgul_string_cxx() [3/3]

cgul_string_cxx::cgul_string_cxx ( const char *  rhs)
inline

Copy constructor that creates a new instance by copying the value from rhs.

Parameters
[in]rhsright-hand side

References cgul_string__new_from_cstring().

§ ~cgul_string_cxx()

virtual cgul_string_cxx::~cgul_string_cxx ( )
inlinevirtual

Destructor.

References cgul_string__delete().

Member Function Documentation

§ operator=() [1/2]

virtual cgul_string_cxx& cgul_string_cxx::operator= ( const cgul_string_cxx rhs)
inlinevirtual

Assign the value from rhs to this object and return this object.

Parameters
[in]rhsright-hand side
Returns
*this

References cgul_string__set_value(), and get_value().

§ operator=() [2/2]

virtual cgul_string_cxx& cgul_string_cxx::operator= ( const char *  rhs)
inlinevirtual

Assign the value from rhs to this object and return this object.

Parameters
[in]rhsright-hand side
Returns
*this

References cgul_string__set_value().

§ operator+=() [1/2]

virtual cgul_string_cxx& cgul_string_cxx::operator+= ( const cgul_string_cxx rhs)
inlinevirtual

Append the value from rhs to this object and return this object.

Parameters
[in]rhsright-hand side
Returns
*this

References cgul_string__append(), and get_value().

§ operator+=() [2/2]

virtual cgul_string_cxx& cgul_string_cxx::operator+= ( const char *  rhs)
inlinevirtual

Append the value from rhs to this object and return this object.

Parameters
[in]rhsright-hand side
Returns
*this

References cgul_string__append().

§ operator[]() [1/2]

virtual char& cgul_string_cxx::operator[] ( size_t  index)
inlinevirtual

Index operator that returns the character at index. If index is out of bounds, an exception is thrown.

References cgul_exception__new(), cgul_string__get_length(), and cgul_string__get_value().

§ operator[]() [2/2]

virtual const char& cgul_string_cxx::operator[] ( size_t  index) const
inlinevirtual

Index operator that returns the character at index. If index is out of bounds, an exception is thrown. This is the overloaded operator[]() that is necessary for use with const objects.

References cgul_exception__new(), cgul_string__get_length(), and cgul_string__get_value().

§ operator char *()

virtual cgul_string_cxx::operator char * ( ) const
inlinevirtual

This method allows instances of this class to be cast to C-style strings.

Returns
underlying c-style string

References get_value().

§ operator==()

virtual int cgul_string_cxx::operator== ( const cgul_string_cxx rhs) const
inlinevirtual

This method compares this object with rhs using the current locale. It returns 1 if this object is equal to rhs; otherwise, it returns 0.

Parameters
[in]rhsright-hand side
Returns
whether this object is equal to rhs

References compare().

§ operator<()

virtual int cgul_string_cxx::operator< ( const cgul_string_cxx rhs) const
inlinevirtual

This method compares this object with rhs using the current locale. It returns 1 if this object is less than rhs; otherwise, it returns 0.

Parameters
[in]rhsright-hand side
Returns
whether this object is less than rhs

References compare().

§ operator<=()

virtual int cgul_string_cxx::operator<= ( const cgul_string_cxx rhs) const
inlinevirtual

This method compares this object with rhs using the current locale. It returns 1 if this object is less than or equal to rhs; otherwise, it returns 0.

Parameters
[in]rhsright-hand side
Returns
whether this object is less than or equal to rhs

References compare().

§ operator>()

virtual int cgul_string_cxx::operator> ( const cgul_string_cxx rhs) const
inlinevirtual

This method compares this object with rhs using the current locale. It returns 1 if this object is greater than rhs; otherwise, it returns 0.

Parameters
[in]rhsright-hand side
Returns
whether this object is greater than rhs

References compare().

§ operator>=()

virtual int cgul_string_cxx::operator>= ( const cgul_string_cxx rhs) const
inlinevirtual

This method compares this object with rhs using the current locale. It returns 1 if this object is greater than or equal to rhs; otherwise, it returns 0.

Parameters
[in]rhsright-hand side
Returns
whether this object is greater than or equal to rhs

References compare().

§ get_value()

virtual char* cgul_string_cxx::get_value ( ) const
inlinevirtual

This method returns a pointer to the internal C-style string. You are allowed to manually set individual characters in the string. Just remember to call externally_adjusted() afterward. Compare this method to the take_value() method.

Returns
underlying c-style string

References cgul_string__get_value().

Referenced by cgul_string_cxx(), operator char *(), operator+=(), and operator=().

§ take_value()

virtual char* cgul_string_cxx::take_value ( )
inlinevirtual

This method lets you take ownership of the underlying C-style string which is returned. Immediately upon taking ownership, the internal state of this class is reset including resetting a new underlying C-style string to be empty. One use of this function is to build up a string using cgul_string that you then pass to cgul_hash or cgul_rbtree. Compare this function with get_value().

Returns
underlying c-style string

References cgul_string__take_value().

§ set_value()

virtual void cgul_string_cxx::set_value ( const char *  value)
inlinevirtual

Set the value of the underlying c-style string to value. If an error occurs, an exception is thrown.

Parameters
[in]valuenew value

References cgul_string__set_value().

§ get_value_at()

virtual char cgul_string_cxx::get_value_at ( size_t  index) const
inlinevirtual

This method returns the character indicated by index where index is zero-based. If index is out of bounds, an exception is thrown.

Parameters
[in]indexindex into the string
Returns
character at index

References cgul_string__get_value_at().

§ set_value_at()

virtual void cgul_string_cxx::set_value_at ( size_t  index,
char  c 
)
inlinevirtual

This method sets the character indicated by index where index is zero-based to c. If index is out of bounds, an exception is thrown.

Parameters
[in]indexindex into the string
[in]ccharacter

References cgul_string__set_value_at().

§ clear()

virtual void cgul_string_cxx::clear ( )
inlinevirtual

This method is equivalent to calling set_value() where value is an empty string.

References cgul_string__clear().

§ to_schar()

virtual signed char cgul_string_cxx::to_schar ( int  base = 0) const
inlinevirtual

This method converts the string to a signed char. Typically, "base" will be set to 0 to allow conversion for decimal, hexadecimal, and octal based on the leading character in the string. The string cannot have any extraneous characters. If it does, the conversion will fail. On success, the converted value is returned; otherwise, 0 is returned and an exception is thrown.

Parameters
[in]basebase to use for the conversion
Returns
converted value
See also
cgul_string__get_value_at()

References cgul_string__to_schar().

§ to_uchar()

virtual unsigned char cgul_string_cxx::to_uchar ( int  base = 0) const
inlinevirtual

This method converts the string to an unsigned char. Typically, base will be set to 0 to allow conversion for decimal, hexadecimal, and octal based on the leading characters in the string. The string cannot have any extraneous characters. If it does, the conversion will fail. On success, the converted value is returned; otherwise, 0 is returned and an exception is thrown.

Parameters
[in]basebase to use for the conversion
Returns
converted value
See also
cgul_string__get_value_at()

References cgul_string__to_uchar().

§ to_short()

virtual short int cgul_string_cxx::to_short ( int  base = 0) const
inlinevirtual

This method converts the string to a short. Typically, "base" will be set to 0 to allow conversion for decimal, hexadecimal, and octal based on the leading character in the string. The string cannot have any extraneous characters. If it does, the conversion will fail. On success, the converted value is returned; otherwise, 0 is returned and an exception is thrown.

Parameters
[in]basebase to use for the conversion
Returns
converted value

References cgul_string__to_short().

§ to_ushort()

virtual unsigned short int cgul_string_cxx::to_ushort ( int  base = 0) const
inlinevirtual

This method converts the string to an unsigned short. Typically, base will be set to 0 to allow conversion for decimal, hexadecimal, and octal based on the leading characters in the string. The string cannot have any extraneous characters. If it does, the conversion will fail. On success, the converted value is returned; otherwise, 0 is returned and an exception is thrown.

Parameters
[in]basebase to use for the conversion
Returns
converted value

References cgul_string__to_ushort().

§ to_int()

virtual int cgul_string_cxx::to_int ( int  base = 0) const
inlinevirtual

This method converts the string to an int. Typically, base will be set to 0 to allow conversion for decimal, hexadecimal, and octal based on the leading character in the string. The string cannot have any extraneous characters. If it does, the conversion fails, and an exception is thrown. An exception will also be thrown if the converted value is out of bounds.

Parameters
[in]basebase to use for the conversion
Returns
converted value

References cgul_string__to_int().

§ to_unsigned()

virtual unsigned int cgul_string_cxx::to_unsigned ( int  base = 0) const
inlinevirtual

This method converts the string to an unsigned. Typically, base will be set to 0 to allow conversion for decimal, hexadecimal, and octal based on the leading characters in the string. The string cannot have any extraneous characters. If it does, the conversion fails, and an exception is thrown. An exception will also be thrown if the converted value is out of bounds.

Parameters
[in]basebase to use for the conversion
Returns
converted value

References cgul_string__to_unsigned().

§ to_long()

virtual long int cgul_string_cxx::to_long ( int  base = 0) const
inlinevirtual

This method converts the string to an long. Typically, base will be set to 0 to allow conversion for decimal, hexadecimal, and octal based on the leading characters in the string. The string cannot have any extraneous characters. If it does, the conversion fails, and an exception is thrown. An exception will also be thrown if the converted value is out of bounds.

Parameters
[in]basebase to use for the conversion
Returns
converted value

References cgul_string__to_long().

§ to_unsigned_long()

virtual unsigned long int cgul_string_cxx::to_unsigned_long ( int  base = 0) const
inlinevirtual

This method converts the string to an unsigned long. Typically, base will be set to 0 to allow conversion for decimal, hexadecimal, and octal based on the leading characters in the string. The string cannot have any extraneous characters. If it does, the conversion fails, and an exception is thrown. An exception will also be thrown if the converted value is out of bounds.

Parameters
[in]basebase to use for the conversion
Returns
converted value

References cgul_string__to_unsigned_long().

§ to_double()

virtual double cgul_string_cxx::to_double ( ) const
inlinevirtual

This method converts the string to a double. The string cannot have any extraneous characters. If it does, the conversion fails, and an exception is thrown. An exception will also be thrown if the converted value is out of bounds.

Returns
converted value

References cgul_string__to_double().

§ append()

virtual void cgul_string_cxx::append ( const char *  value)
inlinevirtual

Appends value to the string. If an error occurs, an exception is thrown.

Parameters
[in]valuevalue to append

References cgul_string__append().

§ append_block()

virtual void cgul_string_cxx::append_block ( const void *  block,
size_t  block_size 
)
inlinevirtual

Append a block of non-NUL characters. The caller should verify that there are no embedded NUL characters in the string. If an error occurs, an exception is thrown.

Parameters
[in]blockblock to append
[in]block_sizesize of block to append

References cgul_string__append_block().

§ append_sprintf()

virtual int cgul_string_cxx::append_sprintf ( const char *  format,
  ... 
)
inlinevirtual

This function is a thin wrapper around append_vsprintf().

Parameters
formatformat string
...variable number of arguments that satisfy format
Returns
number of characters appended

References append_vsprintf().

§ append_vsprintf()

virtual int cgul_string_cxx::append_vsprintf ( const char *  format,
va_list  args 
)
inlinevirtual

This function substitutes the conversion specifications in the format string and appends them to the underlying object. If an error occurs, an exception is thrown.

The format string is the same as what you pass into sprintf() or snprintf(). The following length modifiers are honored: l, h, z.

Any string associated with a "%s" conversion specification is assumed to be a UTF-8 string. The main difference that this makes is that, if a field width is specified, it specifies the number of characters, not bytes, in the field.

The "%ls" conversion specification is honored, but instead of converting a string composed of wchar_t characters to a multi-byte string encoded according to the current locale, it converts a string composed of Unicode UTF-32 cgul_wchar_t characters to a UTF-8 string. The "%ls" conversions also differ in that, if a precision is given, it determines the number of characters appended not the number of bytes.

The "%lc" conversion specification is honored, but like the "%ls" conversion specification, it converts from UTF-32 to UTF-8 exclusively. Also, it expects the associated argument to be cgul_wchar_t, not wchar_t.

The GNU "%m" conversion specification is honored. This conversion specification appends the result of strerror(errno).

Parameters
formatformat string
argsvariable number of arguments that satisfy format
Returns
number of characters appended

References cgul_string__append_vsprintf().

Referenced by append_sprintf().

§ append_char()

virtual void cgul_string_cxx::append_char ( char  c)
inlinevirtual

Append c to the string.

Parameters
[in]ccharacter to append

References cgul_string__append_char().

§ append_hchar()

virtual void cgul_string_cxx::append_hchar ( cgul_hchar_t utf16,
size_t  utf16_length 
)
inlinevirtual

Append the UTF-16 character utf16 as a UTF-8 sequence. Because utf16 could be a surrogate pair, to avoid reading off the end of the sequence, the number of cgul_hchar_t elements (i.e., 16-bit elements) in the utf16 buffer must be specified using utf16_length. If more than one UTF-16 character is present in the utf16 buffer, only the first character is appended.

Parameters
[in]utf16UTF-16 character to append
[in]utf16_lengthlength of utf16 in cgul_hchar_t elements

References cgul_string__append_hchar().

§ append_wchar()

virtual void cgul_string_cxx::append_wchar ( cgul_wchar_t  utf32)
inlinevirtual

Append the UTF-32 character utf32 to the string as a UTF-8 sequence.

Parameters
[in]utf32UTF-32 character to append

References cgul_string__append_wchar().

§ append_decimal()

virtual void cgul_string_cxx::append_decimal ( long int  value)
inlinevirtual

Append value to the string in decimal format.

Parameters
[in]valueto append

References cgul_string__append_decimal().

§ append_unsigned_decimal()

virtual void cgul_string_cxx::append_unsigned_decimal ( size_t  value)
inlinevirtual

Append value to the string in decimal format.

Parameters
[in]valueto append

References cgul_string__append_unsigned_decimal().

§ append_octal()

virtual void cgul_string_cxx::append_octal ( size_t  value)
inlinevirtual

Append value to the string in octal format.

Parameters
[in]valueto append

References cgul_string__append_octal().

§ append_hexadecimal()

virtual void cgul_string_cxx::append_hexadecimal ( size_t  value,
int  caps 
)
inlinevirtual

Append value to the string in hexadecimal format using "abcdef".

Parameters
[in]valueto append
[in]capswhether to capitalize the hex digits

References cgul_string__append_hexadecimal().

§ append_double()

virtual void cgul_string_cxx::append_double ( double  value,
int  precision 
)
inlinevirtual

Append value to the string. "precision" determines the number of significant digits that are printed. Zeros after the decimal point at the end of number are not printed.

Parameters
[in]valueto append
[in]precisionprecision

References cgul_string__append_double().

§ append_pointer()

virtual void cgul_string_cxx::append_pointer ( const void *  ptr)
inlinevirtual

Append ptr to the string.

Parameters
[in]ptrpointer to append

References cgul_string__append_pointer().

§ insert()

virtual void cgul_string_cxx::insert ( size_t  index,
const char *  value,
size_t  value_length 
)
inlinevirtual

Inserts value at index which can range from 0 to the length (inclusive) of this string. If index is out of bounds or if memory cannot be allocated, an exception is thrown.

Parameters
[in]indexindex where value is inserted
[in]valuevalue to insert
[in]value_lengthlength of value

References cgul_string__insert().

§ insert_char()

virtual void cgul_string_cxx::insert_char ( size_t  index,
char  value 
)
inlinevirtual

Inserts value at index which can range from 0 to the length (inclusive) of this string. If index is out of bounds or if memory cannot be allocated, an exception is thrown.

Parameters
[in]indexindex where value is inserted
[in]valuevalue to insert

References cgul_string__insert_char().

§ pad_right()

virtual void cgul_string_cxx::pad_right ( size_t  width,
char  pad 
)
inlinevirtual

Pad the current string such that it is at least width characters wide using the pad character. The string will be right aligned.

Parameters
[in]widthpadding width
[in]padcharacter to use for padding

References cgul_string__pad_right().

§ pad_left()

virtual void cgul_string_cxx::pad_left ( size_t  width,
char  pad 
)
inlinevirtual

Pad the current string such that it is at least width characters wide using the pad character. The string will be left aligned.

Parameters
[in]widthpadding width
[in]padcharacter to use for padding

References cgul_string__pad_left().

§ trim()

virtual void cgul_string_cxx::trim ( )
inlinevirtual

Trim the string by removing leading and trailing white-space where white-space is definded by cgul_char::isspace().

References cgul_string__trim().

§ trim_left()

virtual void cgul_string_cxx::trim_left ( )
inlinevirtual

Trim the string by removing leading white-space where white-space is definded by cgul_char::isspace().

References cgul_string__trim_left().

§ trim_right()

virtual void cgul_string_cxx::trim_right ( )
inlinevirtual

Trim the string by removing trailing white-space where white-space is definded by cgul_char::isspace().

References cgul_string__trim_right().

§ reverse()

virtual void cgul_string_cxx::reverse ( )
inlinevirtual

Reverse the order of the characters in the string.

References cgul_string__reverse().

§ get_length()

virtual size_t cgul_string_cxx::get_length ( ) const
inlinevirtual

This method returns the length of the string.

Returns
length of the string

References cgul_string__get_length().

§ set_length()

virtual size_t cgul_string_cxx::set_length ( size_t  length)
inlinevirtual

This method can be used to set the length of the string. It can only be used to make the string shorter. If it is used in an attempt to make the string longer, an exception is thrown. If the length of the string is successfully changed, the previous length of the string is returned.

Parameters
[in]lengthnew, shorter length of the string
Returns
previous length of the string

References cgul_string__set_length().

§ externally_adjusted()

virtual void cgul_string_cxx::externally_adjusted ( )
inlinevirtual

If you manually alter the underlying buffer by modifying the char* string returned by get_value(), you'll need to manually have the class reset its internal state.

See also
get_value

References cgul_string__externally_adjusted().

§ trim_capacity()

virtual void cgul_string_cxx::trim_capacity ( )
inlinevirtual

Trim the string by returning excess capacity to the heap.

References cgul_string__trim_capacity().

§ get_minimum_capacity()

virtual size_t cgul_string_cxx::get_minimum_capacity ( ) const
inlinevirtual

Get the minimum capacity.

Returns
minimum capacity

References cgul_string__get_minimum_capacity().

§ set_minimum_capacity()

virtual void cgul_string_cxx::set_minimum_capacity ( size_t  minimum_capacity)
inlinevirtual

Set the minimum capacity. The default value is 128 which means there is always capacity for 127 characters plus one NUL-terminator. Decreasing the capacity will decrease the amount of space used and (typically) also decrease performance. If an error occurs, an exception is thrown.

Parameters
[in]minimum_capacityminimum capacity

References cgul_string__set_minimum_capacity().

§ compare()

virtual int cgul_string_cxx::compare ( const cgul_string_cxx rhs) const
inlinevirtual

Perform a case-significant string comparison of this object and rhs using the current locale. Return -1, 0, or 1 if this object is less than, equal to, or greater than rhs respectively.

Note that this method can throw an exception if either string contains a character that is not part of the current locale's collating sequence.

Parameters
[in]rhsright-hand side
Returns
-1, 0, or 1 if *this is less than, equal to, or greater than rhs respectively
See also
cgul_char_cxx::strcmp()

References cgul_string__compare().

Referenced by operator<(), operator<=(), operator==(), operator>(), and operator>=().

§ icompare()

virtual int cgul_string_cxx::icompare ( const cgul_string_cxx rhs) const
inlinevirtual

Perform a case-insensitive string comparison of this object and rhs using the current locale. Return -1, 0, or 1 if this object is less than, equal to, or greater than rhs respectively.

Note that this method can throw an exception if either string contains a character that is not part of the current locale's collating sequence.

Parameters
[in]rhsright-hand side
Returns
-1, 0, or 1 if *this is less than, equal to, or greater than rhs respectively

References cgul_string__icompare().

§ swap()

virtual void cgul_string_cxx::swap ( cgul_string_cxx rhs)
inlinevirtual

Swap the underlying data for this object and rhs. For large strings, this should be much faster than trying to do the same thing using set_value().

Parameters
[in]rhsright-hand side

References cgul_string__swap().

§ get_obj()

§ take_obj()

virtual cgul_string_t cgul_string_cxx::take_obj ( )
inlinevirtual

Take the underlying cgul_string object. This means the underlying object will not be deleted when the wrapper goes out of scope. Also, because you have taken the underlying object, no other methods should be called on this wrapper's instance. Lastly, after taking the underlying object, it is the caller's responsibility to delete the underlying object by calling cgul_string__delete().

Returns
underlying object

§ set_obj()

virtual void cgul_string_cxx::set_obj ( cgul_string_t  rhs)
inlinevirtual

Set the new underlying object to rhs. This causes the old underlying object to be deleted which invalidates any outstanding pointers to or iterators for the old underlying object.

This instance takes ownership of rhs which means rhs will be automatically deleted when the C++ wrapper is deleted. To prevent automatic deletion of rhs, call take_obj() when the C++ wrapper is no longer needed.

Parameters
[in]rhsright-hand side

References cgul_string__delete().


The documentation for this class was generated from the following file: