32 #ifndef _QORE_QOREQUESTIONMARKOPERATORNODE_H
33 #define _QORE_QOREQUESTIONMARKOPERATORNODE_H
35 class QoreQuestionMarkOperatorNode :
public QoreNOperatorNodeBase<3> {
39 const QoreTypeInfo* typeInfo =
nullptr;
41 DLLLOCAL
virtual int parseInitImpl(
QoreValue& val, QoreParseContext& parse_context);
47 : QoreNOperatorNodeBase<3>(loc, e0, QoreSimpleValue().assign(e1), QoreSimpleValue().assign(e2)) {
52 return &question_mark_str;
56 str.
concat(&question_mark_str);
60 DLLLOCAL
virtual const QoreTypeInfo* getTypeInfo()
const {
65 DLLLOCAL
virtual const char* getTypeName()
const {
69 DLLLOCAL
virtual QoreOperatorNode* copyBackground(
ExceptionSink* xsink)
const {
70 ValueHolder n_e0(copy_value_and_resolve_lvar_refs(e[0], xsink), xsink);
73 ValueHolder n_e1(copy_value_and_resolve_lvar_refs(e[1], xsink), xsink);
76 ValueHolder n_e2(copy_value_and_resolve_lvar_refs(e[2], xsink), xsink);
79 return new QoreQuestionMarkOperatorNode(get_runtime_location(), n_e0.release(), n_e1.release(),
83 DLLLOCAL
virtual bool hasEffectAsRoot()
const {
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
DLLEXPORT void concat(const QoreString *str, ExceptionSink *xsink)
concatenates a string and converts encodings if necessary
DLLEXPORT const char * getBuffer() const
returns the string's buffer; this data should not be changed
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