32 #ifndef _QORE_QOREQUESTIONMARKOPERATORNODE_H
33 #define _QORE_QOREQUESTIONMARKOPERATORNODE_H
35 class QoreQuestionMarkOperatorNode :
public QoreNOperatorNodeBase<3> {
39 const QoreTypeInfo* typeInfo =
nullptr;
41 DLLLOCAL
virtual void parseInitImpl(
QoreValue& val, LocalVar* oflag,
int pflag,
int& lvids,
const QoreTypeInfo*& typeInfo);
46 DLLLOCAL QoreQuestionMarkOperatorNode(
const QoreProgramLocation* loc,
QoreValue e0,
QoreValue e1,
QoreValue e2) : QoreNOperatorNodeBase<3>(loc, e0, QoreSimpleValue().assign(e1), QoreSimpleValue().assign(e2)) {
51 return &question_mark_str;
55 str.
concat(&question_mark_str);
59 DLLLOCAL
virtual const QoreTypeInfo* getTypeInfo()
const {
64 DLLLOCAL
virtual const char* getTypeName()
const {
68 DLLLOCAL
virtual QoreOperatorNode* copyBackground(
ExceptionSink* xsink)
const {
69 ValueHolder n_e0(copy_value_and_resolve_lvar_refs(e[0], xsink), xsink);
72 ValueHolder n_e1(copy_value_and_resolve_lvar_refs(e[1], xsink), xsink);
75 ValueHolder n_e2(copy_value_and_resolve_lvar_refs(e[2], xsink), xsink);
78 return new QoreQuestionMarkOperatorNode(get_runtime_location(), n_e0.release(), n_e1.release(), n_e2.release());
81 DLLLOCAL
virtual bool hasEffectAsRoot()
const {