| Qore Programming Language - C/C++ Library 1.0.8

QoreIteratorBase.h
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 /*
3 QoreIteratorBase.h
4
5 abstract class for private data for iterators in objects
6
7 Qore Programming Language
8
9 Copyright (C) 2003 - 2018 Qore Technologies, s.r.o.
10
11 Permission is hereby granted, free of charge, to any person obtaining a
12 copy of this software and associated documentation files (the "Software"),
13 to deal in the Software without restriction, including without limitation
14 the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 and/or sell copies of the Software, and to permit persons to whom the
16 Software is furnished to do so, subject to the following conditions:
17
18 The above copyright notice and this permission notice shall be included in
19 all copies or substantial portions of the Software.
20
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27 DEALINGS IN THE SOFTWARE.
28
29 Note that the Qore library is released under a choice of three open-source
30 licenses: MIT (as above), LGPL 2+, or GPL 2+; see README-LICENSE for more
31 information.
32 */
33
34 #ifndef _QORE_QOREITERATORBASE_H
35
36 #define _QORE_QOREITERATORBASE_H
37
38 #include <qore/AbstractPrivateData.h>
39
40 DLLEXPORT extern QoreClass* QC_ABSTRACTITERATOR;
41 DLLEXPORT extern QoreClass* QC_ABSTRACTBIDIRECTIONALITERATOR;
42 DLLEXPORT extern QoreClass* QC_ABSTRACTQUANTIFIEDBIDIRECTIONALITERATOR;
43 DLLEXPORT extern QoreClass* QC_ABSTRACTQUANTIFIEDITERATOR;
44 DLLEXPORT extern QoreClass* QC_ABSTRACTLINEITERATOR;
45
46 class QoreAbstractIteratorBase {
47 protected:
48 int tid;
49
50 public:
52 DLLEXPORT QoreAbstractIteratorBase();
53
55 DLLEXPORT virtual ~QoreAbstractIteratorBase();
56
58 DLLEXPORT int check(ExceptionSink* xsink) const;
59
61 DLLEXPORT virtual const char* getName() const = 0;
62
64 DLLLOCAL virtual const QoreTypeInfo* getElementType() const = 0;
65 };
66
68 class QoreIteratorBase : public AbstractPrivateData, public QoreAbstractIteratorBase {
69 protected:
71 DLLEXPORT virtual ~QoreIteratorBase();
72
73 public:
75 DLLEXPORT QoreIteratorBase();
76 };
77
78 #endif
AbstractPrivateData
the base class for all data to be used as private data of Qore objects
Definition: AbstractPrivateData.h:44
QoreIteratorBase
abstract base class for iterator private data
Definition: QoreIteratorBase.h:68
QoreClass
defines a Qore-language class
Definition: QoreClass.h:239
QoreIteratorBase::QoreIteratorBase
DLLEXPORT QoreIteratorBase()
creates the object and marks it as owned by the current thread
ExceptionSink
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
QoreIteratorBase::~QoreIteratorBase
virtual DLLEXPORT ~QoreIteratorBase()
destroys the object