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 void parseInitImpl(
QoreValue& val, LocalVar* oflag,
int pflag,
int& lvids,
const QoreTypeInfo*& typeInfo);
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());