PST SDK 7.0.0.0-ebe6e713
Loading...
Searching...
No Matches
PstString Class Reference

#include <PstString.h>

Collaboration diagram for PstString:

Public Member Functions

 PstString ()
 PstString (const PstString &string)
 PstString (PstString &&string) noexcept
 ~PstString ()
const char * c_str () const
size_t length () const
size_t size () const
void clear ()
bool empty () const
PstStringoperator= (const PstString &string)
PstStringoperator= (PstString &&string) noexcept
bool operator== (const PstString &string) const
bool operator!= (const PstString &string) const

Private Member Functions

void copy_internal (const PstString &string)
void move_internal (PstString &&string) noexcept

Private Attributes

char * m_string
size_t m_size

Friends

PstString operator+ (PstString left, const PstString &right)

Detailed Description

Basic string class, cloning std::string. This class can safely be passed across the DLL boundary.

Constructor & Destructor Documentation

◆ PstString() [1/3]

PstString ( )

Default constructor creating an empty PstString.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PstString() [2/3]

PstString ( const PstString & string)

Converting constructor converting c-string `string' to PstString. */ PstString(const char* string);

/** Copy constructor.

Here is the call graph for this function:

◆ PstString() [3/3]

PstString ( PstString && string)
noexcept

Move constructor.

Here is the call graph for this function:

◆ ~PstString()

~PstString ( )

Destructor

Member Function Documentation

◆ c_str()

const char * c_str ( ) const

Returns a non-modifyable standard C character array version of the PstString.

◆ clear()

void clear ( )

Changes the number of characters stored in the PstString to `size' characters. */ void resize(size_t size);

/** Compares this PstString to `string'.

  • Returns 0 if the contents of the two PstStrings is equal.
  • Returns a negative value if this PstString appears before string', in lexicographical order.
  • Returns a positive value if this PstString appears after string', in lexicographical order. */ int compare(const PstString& string) const;

/** Concatenates the PstString supplied by `string' to this PstString.

Returns
A reference to this concatenated PstString. */ PstString& append(const PstString& string);

/** Destroy the contents of the PstString, leaving it empty.

◆ copy_internal()

void copy_internal ( const PstString & string)
private
Here is the call graph for this function:

◆ empty()

bool empty ( ) const

Returns true if this PstString contains no characters.

◆ length()

size_t length ( ) const

Returns the number of characters in the PstString. Equivalent to PstString::size()

See also
PstString::size()

◆ move_internal()

void move_internal ( PstString && string)
privatenoexcept
Here is the call graph for this function:

◆ operator!=()

bool operator!= ( const PstString & string) const

Lexicographical comparison of two PstStrings.

Returns
True when PstStrings are not equal.
Here is the call graph for this function:

◆ operator=() [1/2]

PstString & operator= ( const PstString & string)

Assign values to the PstString by copying.

Here is the call graph for this function:

◆ operator=() [2/2]

PstString & operator= ( PstString && string)
noexcept

Assign values to the PstString by moving.

Here is the call graph for this function:

◆ operator==()

bool operator== ( const PstString & string) const

Lexicographical comparison of two PstStrings.

Returns
True when PstStrings are equal.
Here is the call graph for this function:

◆ size()

size_t size ( ) const

Returns the number of characters in the PstString. Equivalent to PstString::length()

See also
PstString::length()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator+

PstString operator+ ( PstString left,
const PstString & right )
friend

Lexicographical comparison of two PstStrings.

Returns
True when this PstString appears before `string'. */ bool operator<(const PstString& string) const;

/** Lexicographical comparison of two PstStrings.

Returns
True when this PstString appears before or is equal to `string'. */ bool operator<=(const PstString& string) const;

/** Lexicographical comparison of two PstStrings.

Returns
True when this PstString appears after `string'. */ bool operator>(const PstString& string) const;

/** Lexicographical comparison of two PstStrings.

Returns
True when this PstString appears after or is equal to `string'. */ bool operator>=(const PstString& string) const;

/** Appends the string supplied by `right' to this PstString.

Returns
A reference to this appended PstString.
See also
PstString::append() */ PstString& operator+=(const PstString& right);

/** Concatenate the PstString supplied by right' to the PstString supplied by left'.

Returns
The concatenation of the two PstStrings.
See also
PstString::append()

Member Data Documentation

◆ m_size

size_t m_size
private

◆ m_string

char* m_string
private

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