Qore Programming Language 1.16.0
|
this class is used to safely manage calls to AbstractQoreNode::getStringRepresentation() when a QoreStringNode value is needed, stack only, may not be dynamically allocated More...
#include <QoreStringNode.h>
Public Member Methods | |
DLLEXPORT | QoreStringNodeValueHelper (const QoreValue n, const QoreEncoding *enc, ExceptionSink *xsink) |
gets the QoreString representation and ensures that it's in the desired encoding More... | |
DLLEXPORT | ~QoreStringNodeValueHelper () |
destroys the object and dereferences the QoreStringNode if it is a temporary pointer | |
DLLEXPORT QoreStringNode * | getReferencedValue () |
returns a referenced value - the caller will own the reference More... | |
DLLEXPORT bool | is_temp () const |
returns true if the reference being managed is temporary | |
DLLEXPORT const QoreStringNode * | operator* () |
returns the object being managed More... | |
DLLEXPORT const QoreStringNode * | operator-> () |
returns the object being managed More... | |
this class is used to safely manage calls to AbstractQoreNode::getStringRepresentation() when a QoreStringNode value is needed, stack only, may not be dynamically allocated
the QoreStringNode value returned by this function is managed safely in an exception-safe way with this class
DLLEXPORT QoreStringNodeValueHelper::QoreStringNodeValueHelper | ( | const QoreValue | n, |
const QoreEncoding * | enc, | ||
ExceptionSink * | xsink | ||
) |
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
DLLEXPORT QoreStringNode * QoreStringNodeValueHelper::getReferencedValue | ( | ) |
returns a referenced value - the caller will own the reference
The string is referenced if necessary (if it was a not a temporary value)
DLLEXPORT const QoreStringNode * QoreStringNodeValueHelper::operator* | ( | ) |
returns the object being managed
DLLEXPORT const QoreStringNode * QoreStringNodeValueHelper::operator-> | ( | ) |
returns the object being managed