32 #ifndef _QORE_QOREKEYSOPERATORNODE_H
34 #define _QORE_QOREKEYSOPERATORNODE_H
36 #include "qore/intern/FunctionalOperator.h"
37 #include "qore/intern/FunctionalOperatorInterface.h"
39 class QoreKeysOperatorNode :
public QoreSingleExpressionOperatorNode<QoreOperatorNode>,
public FunctionalOperator {
41 const QoreTypeInfo* returnTypeInfo;
47 DLLLOCAL
virtual void parseInitImpl(
QoreValue& val, LocalVar* oflag,
int pflag,
int& lvids,
const QoreTypeInfo*& typeInfo);
49 DLLLOCAL
virtual const QoreTypeInfo* getTypeInfo()
const {
50 return returnTypeInfo;
53 DLLLOCAL
virtual FunctionalOperatorInterface* getFunctionalIteratorImpl(FunctionalValueType& value_type,
ExceptionSink* xsink)
const;
56 DLLLOCAL QoreKeysOperatorNode(
const QoreProgramLocation* loc,
QoreValue exp) : QoreSingleExpressionOperatorNode<QoreOperatorNode>(loc, exp), returnTypeInfo(nullptr) {
59 DLLLOCAL
virtual ~QoreKeysOperatorNode() {
67 DLLLOCAL
virtual const char* getTypeName()
const {
68 return keys_str.getBuffer();
71 DLLLOCAL
virtual QoreOperatorNode* copyBackground(
ExceptionSink* xsink)
const {
72 return copyBackgroundExplicit<QoreKeysOperatorNode>(xsink);
76 class QoreFunctionalKeysOperator :
public FunctionalOperatorInterface,
public ConstHashIterator {
81 DLLLOCAL
virtual ~QoreFunctionalKeysOperator() {
89 DLLLOCAL
virtual const QoreTypeInfo* getValueTypeImpl()
const {
90 return stringTypeInfo;