32 #ifndef _QORE_QOREEXTRACTOPERATORNODE_H
34 #define _QORE_QOREEXTRACTOPERATORNODE_H
36 class QoreExtractOperatorNode :
public LValueOperatorNode {
38 QoreValue lvalue_exp, offset_exp, length_exp, new_exp;
39 const QoreTypeInfo* returnTypeInfo =
nullptr;
45 DLLLOCAL ~QoreExtractOperatorNode() {
52 DLLLOCAL
virtual int parseInitImpl(
QoreValue& val, QoreParseContext& parse_context);
54 DLLLOCAL
virtual const QoreTypeInfo *getTypeInfo()
const {
55 return returnTypeInfo;
59 DLLLOCAL QoreExtractOperatorNode(
const QoreProgramLocation* loc,
62 LValueOperatorNode(loc),
63 lvalue_exp(n_lvalue_exp),
64 offset_exp(n_offset_exp),
65 length_exp(n_length_exp),
72 DLLLOCAL
virtual const char *getTypeName()
const {
73 return extract_str.getBuffer();
76 DLLLOCAL
virtual bool hasEffect()
const {
80 DLLLOCAL
virtual QoreOperatorNode* copyBackground(
ExceptionSink *xsink)
const {
81 ValueHolder n_lv(copy_value_and_resolve_lvar_refs(lvalue_exp, xsink), xsink);
84 ValueHolder n_of(copy_value_and_resolve_lvar_refs(offset_exp, xsink), xsink);
87 ValueHolder n_ln(copy_value_and_resolve_lvar_refs(length_exp, xsink), xsink);
90 ValueHolder n_nw(copy_value_and_resolve_lvar_refs(new_exp, xsink), xsink);
93 return new QoreExtractOperatorNode(get_runtime_location(), n_lv.release(), n_of.release(), n_ln.release(), n_nw.release());
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:93
holds an object and dereferences it in the destructor
Definition: QoreValue.h:476
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:275
DLLEXPORT void discard(ExceptionSink *xsink)
dereferences any contained AbstractQoreNode pointer and sets to 0; does not modify other values