Qore Programming Language
0.8.11.1
|
this class is used to safely manage calls to AbstractQoreNode::getStringRepresentation() when a simple QoreString value is needed, stack only, may not be dynamically allocated More...
#include <QoreStringNode.h>
Public Member Functions | |
DLLLOCAL | QoreStringValueHelper (const AbstractQoreNode *n) |
creates the object and acquires a pointer to the QoreString representation of the AbstractQoreNode passed | |
DLLLOCAL | QoreStringValueHelper (const AbstractQoreNode *n, const QoreEncoding *enc, ExceptionSink *xsink) |
gets the QoreString representation and ensures that it's in the desired encoding More... | |
DLLLOCAL | ~QoreStringValueHelper () |
destroys the object and deletes the QoreString pointer being managed if it was a temporary pointer | |
DLLLOCAL QoreString * | giveString () |
returns a copy of the QoreString that the caller owns More... | |
DLLLOCAL bool | is_temp () const |
returns true if the pointer being managed is temporary | |
DLLLOCAL const QoreString * | operator* () |
returns the object being managed More... | |
DLLLOCAL const QoreString * | operator-> () |
returns the object being managed More... | |
this class is used to safely manage calls to AbstractQoreNode::getStringRepresentation() when a simple QoreString value is needed, stack only, may not be dynamically allocated
the QoreString value returned by this function is managed safely in an exception-safe way with this class
|
inline |
gets the QoreString representation and ensures that it's in the desired encoding
a Qore-language exception may be thrown if an encoding error occurs
References QoreString::convertEncoding(), QoreString::getEncoding(), AbstractQoreNode::getStringRepresentation(), AbstractQoreNode::getType(), and NT_STRING.
|
inline |
returns a copy of the QoreString that the caller owns
the object may be left empty after this call
References QoreString::copy().
|
inline |
returns the object being managed
|
inline |
returns the object being managed