32 #ifndef _QORE_QORELISTITERATOR_H
34 #define _QORE_QORELISTITERATOR_H
43 if (!QoreTypeInfo::hasType(myElementTypeInfo)) {
44 myElementTypeInfo = autoTypeInfo;
48 DLLLOCAL QoreListIterator(
const QoreListIterator& old) :
ConstListIterator(old.l->listRefSelf(), old.pos), myElementTypeInfo(old.myElementTypeInfo) {
65 DLLLOCAL
virtual const char* getName()
const {
66 return "ListIterator";
69 DLLLOCAL
virtual const QoreTypeInfo* getElementType()
const {
70 return myElementTypeInfo;
74 const QoreTypeInfo* myElementTypeInfo;
76 DLLLOCAL
virtual ~QoreListIterator() {
81 xsink->
raiseException(
"ITERATOR-ERROR",
"the %s is not pointing at a valid element; make sure %s::next() returns True before calling this method", getName(), getName());
virtual DLLLOCAL void deref()
decrements the reference count of the object without the possibility of throwing a Qore-language exce...
Definition: AbstractPrivateData.h:65
For use on the stack only: iterates through elements of a const QoreListNode.
Definition: QoreListNode.h:563
DLLEXPORT QoreValue getReferencedValue() const
returns the referenced value of the list element
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
DLLEXPORT AbstractQoreNode * raiseException(const char *err, const char *fmt,...)
appends a Qore-language exception to the list
defines a Qore-language class
Definition: QoreClass.h:249
abstract base class for iterator private data
Definition: QoreIteratorBase.h:68
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)
DLLEXPORT bool ROdereference() const
atomically decrements the reference count
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:275