32 #ifndef _QORE_QORERANGEOPERATORNODE_H
33 #define _QORE_QORERANGEOPERATORNODE_H
35 #include "qore/intern/RangeIterator.h"
36 #include "qore/intern/FunctionalOperator.h"
37 #include "qore/intern/FunctionalOperatorInterface.h"
39 class QoreRangeOperatorNode :
public QoreIntBinaryOperatorNode,
public FunctionalOperator {
42 const QoreTypeInfo* typeInfo;
46 DLLLOCAL
virtual void parseInitImpl(
QoreValue& val, LocalVar* oflag,
int pflag,
int& lvids,
const QoreTypeInfo*& typeInfo);
48 DLLLOCAL
virtual const QoreTypeInfo* getTypeInfo()
const {
52 DLLLOCAL
virtual FunctionalOperatorInterface* getFunctionalIteratorImpl(FunctionalValueType& value_type,
ExceptionSink* xsink)
const;
55 DLLLOCAL QoreRangeOperatorNode(
const QoreProgramLocation* loc,
QoreValue left,
QoreValue right)
56 : QoreIntBinaryOperatorNode(loc, left, right) {
59 DLLLOCAL
virtual QoreOperatorNode* copyBackground(
ExceptionSink* xsink)
const {
60 return copyBackgroundExplicit<QoreRangeOperatorNode>(xsink);
64 class QoreFunctionalRangeOperator :
public FunctionalOperatorInterface,
public RangeIterator {
70 : RangeIterator(start, stop, 1, &
Nothing, xs), xsink(xs) {
73 DLLLOCAL
virtual ~QoreFunctionalRangeOperator() {
78 DLLLOCAL
virtual const QoreTypeInfo* getValueTypeImpl()
const {
79 return getElementType();