Qore Programming Language  0.9.1
TempString Class Reference

class used to hold a possibly temporary QoreString pointer, stack only, cannot be dynamically allocated More...

#include <QoreString.h>

Public Member Methods

DLLLOCAL TempString ()
 populates the object with a new QoreString that this object will manage
 
DLLLOCAL TempString (const QoreEncoding *enc)
 populates the object with a new QoreString in a specific encoding that this object will manage
 
DLLLOCAL TempString (QoreString *s)
 populates the object with the QoreString pointer to be managed
 
DLLLOCAL ~TempString ()
 deletes the QoreString pointer being managed
 
DLLLOCAL operator bool () const
 returns true if a QoreString pointer is being managed
 
DLLLOCAL QoreStringoperator* ()
 returns the QoreString pointer being managed
 
DLLLOCAL QoreStringoperator-> ()
 returns the QoreString pointer being managed
 
DLLLOCAL QoreStringrelease ()
 releases the QoreString pointer being managed and sets the internal pointer to 0
 

Detailed Description

class used to hold a possibly temporary QoreString pointer, stack only, cannot be dynamically allocated

...
if (error)
return 0; // here the memory is automatically released
return rv.release();

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