32 #ifndef _QORE_INTERN_FUNCTIONALOPERATORINTERFACE_H
34 #define _QORE_INTERN_FUNCTIONALOPERATORINTERFACE_H
36 #include "qore/intern/AbstractIteratorHelper.h"
37 #include "qore/intern/FunctionalOperator.h"
39 class FunctionalOperatorInterface {
41 DLLLOCAL
virtual ~FunctionalOperatorInterface() {
51 DLLLOCAL
virtual const QoreTypeInfo* getValueType()
const {
52 return getValueTypeImpl();
55 DLLLOCAL
virtual const QoreTypeInfo* getValueTypeImpl()
const = 0;
57 DLLLOCAL
static FunctionalOperatorInterface* getFunctionalIterator(
58 FunctionalOperator::FunctionalValueType& value_type,
QoreValue exp,
bool fwd,
const char* who,
62 class QoreFunctionalListOperator :
public FunctionalOperatorInterface,
public ConstListIterator {
72 DLLLOCAL
virtual ~QoreFunctionalListOperator() {
76 DLLLOCAL
virtual const QoreTypeInfo* getValueTypeImpl()
const {
83 class QoreFunctionalSingleValueOperator :
public FunctionalOperatorInterface {
93 DLLLOCAL
virtual ~QoreFunctionalSingleValueOperator() {
97 DLLLOCAL
virtual const QoreTypeInfo* getValueTypeImpl()
const {
104 class QoreFunctionalIteratorOperator :
public FunctionalOperatorInterface {
107 AbstractIteratorHelper h;
112 DLLLOCAL QoreFunctionalIteratorOperator(
bool t, AbstractIteratorHelper n_h,
ExceptionSink* xs) : temp(t), h(n_h),
116 DLLLOCAL ~QoreFunctionalIteratorOperator() {
121 DLLLOCAL
virtual const QoreTypeInfo* getValueTypeImpl()
const {
For use on the stack only: iterates through elements of a const QoreListNode.
Definition: QoreListNode.h:563
DLLLOCAL const QoreListNode * getList() const
returns the list
Definition: QoreListNode.h:627
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
DLLEXPORT const QoreTypeInfo * getValueTypeInfo() const
returns the value type declaration (if set)
allows storing a value and setting a boolean flag that indicates if the value should be dereference i...
Definition: QoreValue.h:509
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:275
DLLEXPORT void discard(ExceptionSink *xsink)
dereferences any contained AbstractQoreNode pointer and sets to 0; does not modify other values
DLLEXPORT const QoreTypeInfo * getTypeInfo() const
returns the type of the value