All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
QoreStringNodeValueHelper Class Reference

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 Functions

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...
DLLLOCAL const QoreStringNode * | operator* ()
| returns the object being managed More...
DLLLOCAL const QoreStringNode * | operator-> ()
| returns the object being managed More...

## Detailed Description

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

QoreStringNodeValueHelper str(n);
printf("str='%s'\n", str->getBuffer());
return str.getReferencedValue();

## Member Function Documentation

DLLEXPORT QoreStringNode* QoreStringNodeValueHelper::getReferencedValue | ( |  | ) |

returns a referenced value - the caller will own the reference

The string is referenced if necessary (if it was a temporary value)

Returns
  the string value, where the caller will own the reference count

DLLLOCAL const QoreStringNode* QoreStringNodeValueHelper::operator* | ( |  | ) |

inline

returns the object being managed

Returns
  the object being managed

DLLLOCAL const QoreStringNode* QoreStringNodeValueHelper::operator-> | ( |  | ) |

inline

returns the object being managed

Returns
  the object being managed

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

- include/qore/QoreStringNode.h (6de6cc3b438610bf03b2bec44a3d7c61f90e3165)