Simplygon C++ API  8.3.35800.0
SimplygonSDK::rstring Class Reference

#include <SimplygonSDK.h>

Public Member Functions

const char * GetText () const
 
bool IsEmpty () const
 
bool IsNull () const
 
 operator const char * () const
 
IStringoperator-> () const
 
rstringoperator= (const rstring &p)
 
 rstring (const rstring &p)
 
 rstring (IString *p=nullptr)
 
 ~rstring ()
 

Detailed Description

The rstring is a help class that handles type conversion and reference counting for the IString interface. The IString class is used to represent strings that are created by the API objects, and returned to the caller. The strings are reference counted and constant strings, and can be retrieved, but not modified. All methods that input a string value does this using basic null-terminated char-pointers. For simplicity it is recommended to never use the IString interface directly, but instead through an rstring object, which inherits from a CountedPointer of IString, and that also adds help code and conversions.

Definition at line 437 of file SimplygonSDK.h.

Constructor & Destructor Documentation

◆ rstring() [1/2]

SimplygonSDK::rstring::rstring ( IString p = nullptr)
inline

Constructs a rstring from an IData interface pointer.

Parameters
pis a pointer to an IString object, or nullptr to make the rstring point at nothing.

Definition at line 444 of file SimplygonSDK.h.

◆ rstring() [2/2]

SimplygonSDK::rstring::rstring ( const rstring p)
inline

Points an rstring at content of another rstring. Adds reference count ot the IString object

Parameters
pis an rstring that points at an IString object or nullptr

Definition at line 453 of file SimplygonSDK.h.

◆ ~rstring()

SimplygonSDK::rstring::~rstring ( )
inline

Destructs the rdata, and releases one reference to the IData object, if the rdata currently points at an object.

Definition at line 461 of file SimplygonSDK.h.

Member Function Documentation

◆ GetText()

const char* SimplygonSDK::rstring::GetText ( ) const
inline

Method to retrieve the string value as a const char *. If the rstring does not point at an object, NULL is returned

Definition at line 483 of file SimplygonSDK.h.

◆ IsEmpty()

bool SimplygonSDK::rstring::IsEmpty ( ) const
inline

Method to check if the rstring is empty, which is the case if the rstring does not point at an IString object, the IString object does not contain a string, or the string exists, but has zero length.

Definition at line 502 of file SimplygonSDK.h.

◆ IsNull()

bool SimplygonSDK::rstring::IsNull ( ) const
inline

Method to check if the rstring pointer is nullptr.

Definition at line 512 of file SimplygonSDK.h.

◆ operator const char *()

SimplygonSDK::rstring::operator const char * ( ) const
inline

Operator to cast the rstring into a const char *. If the rstring does not point at an object, NULL is returned

Definition at line 493 of file SimplygonSDK.h.

◆ operator->()

IString* SimplygonSDK::rstring::operator-> ( ) const
inline
        Operator that returns a standard pointer to the IString that rstring is referencing. Please use IsNull to 

check if the pointer is nullptr before using.

Returns
a pointer to the object the pointer is pointing at

Definition at line 524 of file SimplygonSDK.h.

◆ operator=()

rstring& SimplygonSDK::rstring::operator= ( const rstring p)
inline

Operator that sets the rstring to point at the same IString as the source rstring

Definition at line 469 of file SimplygonSDK.h.


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