• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

Analitza

  • sources
  • kde-4.14
  • kdeedu
  • analitza
  • analitza
list.h
Go to the documentation of this file.
1 /*************************************************************************************
2  * Copyright (C) 2009 by Aleix Pol <aleixpol@kde.org> *
3  * *
4  * This program is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU General Public License *
6  * as published by the Free Software Foundation; either version 2 *
7  * of the License, or (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with this program; if not, write to the Free Software *
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
17  *************************************************************************************/
18 
19 #ifndef LIST_H
20 #define LIST_H
21 
22 #include "object.h"
23 #include "analitzaexport.h"
24 
25 namespace Analitza
26 {
27 
34 class ANALITZA_EXPORT List : public Object
35 {
36  public:
37  typedef QList<Object*>::iterator iterator;
38  typedef QList<Object*>::const_iterator const_iterator;
39 
40  List(const List& v);
41  List();
42  virtual ~List();
43 
44  void appendBranch(Object* );
45  int size() const { return m_elements.size(); }
46 
47  iterator erase(const iterator& it) { return m_elements.erase(it); }
48 
49  iterator begin() { return m_elements.begin(); }
50  iterator end() { return m_elements.end(); }
51  const_iterator constBegin() const { return m_elements.constBegin(); }
52  const_iterator constEnd() const { return m_elements.constEnd(); }
53 
54  Object* at(int i) const { return m_elements.at(i); }
55  void setAt(int i, Object* o) { m_elements[i]=o; }
56  QList<Object*> values() const { return m_elements; }
57 
58  virtual QVariant accept(AbstractExpressionVisitor* e) const;
59  virtual bool isZero() const;
60 
61  virtual bool matches(const Object* pattern, QMap< QString, const Object* >* found) const;
62  virtual List* copy() const;
63  bool operator==(const List& v) const;
64  bool isEmpty() const { return m_elements.isEmpty(); }
65 
66  private:
67  QList<Object*> m_elements;
68 };
69 
70 }
71 #endif // VECTOR_H
Analitza::AbstractExpressionVisitor
Definition: abstractexpressionvisitor.h:49
Analitza::List::values
QList< Object * > values() const
Definition: list.h:56
Analitza::List::constBegin
const_iterator constBegin() const
Definition: list.h:51
Analitza::List::isEmpty
bool isEmpty() const
Definition: list.h:64
QMap
Analitza::List::constEnd
const_iterator constEnd() const
Definition: list.h:52
QList::const_iterator
Analitza::List::end
iterator end()
Definition: list.h:50
Analitza::List::begin
iterator begin()
Definition: list.h:49
Analitza::List::erase
iterator erase(const iterator &it)
Definition: list.h:47
QList
QList::iterator
Analitza::List::size
int size() const
Definition: list.h:45
analitzaexport.h
Analitza::List::at
Object * at(int i) const
Definition: list.h:54
Analitza::Object
Definition: object.h:38
object.h
ANALITZA_EXPORT
#define ANALITZA_EXPORT
Definition: analitzaexport.h:31
Analitza::List
Definition: list.h:34
Analitza::List::setAt
void setAt(int i, Object *o)
Definition: list.h:55
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:37 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Analitza

Skip menu "Analitza"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal