• 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
stringexpressionwriter.h
Go to the documentation of this file.
1 /*************************************************************************************
2  * Copyright (C) 2008 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 STRINGEXPRESSIONWRITER_H
20 #define STRINGEXPRESSIONWRITER_H
21 
22 #include "abstractexpressionvisitor.h"
23 #include "operator.h"
24 
25 namespace Analitza
26 {
27 
36 class StringExpressionWriter : public AbstractExpressionVisitor
37 {
38  public:
39  StringExpressionWriter(const Object* o);
40 
41  virtual QVariant visit(const Ci* var);
42  virtual QVariant visit(const Cn* var);
43  virtual QVariant visit(const Container* var);
44  virtual QVariant visit(const Operator* var);
45  virtual QVariant visit(const Vector* var);
46  virtual QVariant visit(const List* l);
47  virtual QVariant visit(const Matrix* m);
48  virtual QVariant visit(const MatrixRow* mr);
49  virtual QVariant visit(const Apply* a);
50  virtual QVariant visit(const CustomObject* c);
51 
52  QVariant result() const { return m_result; }
53 
54  static int weight(const Analitza::Operator* op, int size, int pos);
55  static const QMap<Operator::OperatorType, QString> s_operators;
56  private:
57  template <class T>
58  static QStringList allValues(T it, const T& itEnd, AbstractExpressionVisitor* writer);
59 
60  QVariant m_result;
61 };
62 
63 }
64 #endif
Analitza::AbstractExpressionVisitor
Definition: abstractexpressionvisitor.h:49
Analitza::StringExpressionWriter::s_operators
static const QMap< Operator::OperatorType, QString > s_operators
Definition: stringexpressionwriter.h:55
Analitza::StringExpressionWriter::StringExpressionWriter
StringExpressionWriter(const Object *o)
QMap
Analitza::Cn
Cn is a value in MathML.
Definition: value.h:42
Analitza::Operator
Is the operator representation in the trees.
Definition: operator.h:36
Analitza::CustomObject
Definition: customobject.h:39
Analitza::MatrixRow
Definition: matrix.h:29
Analitza::Ci
A variable object, name refers to MathML standard.
Definition: variable.h:34
Analitza::Vector
Definition: vector.h:34
Analitza::Matrix
Definition: matrix.h:38
operator.h
abstractexpressionvisitor.h
Analitza::StringExpressionWriter::visit
virtual QVariant visit(const Ci *var)
Analitza::StringExpressionWriter
This class represents the string expression writer.
Definition: stringexpressionwriter.h:36
QStringList
Analitza::Container
Container represents special tags of MathML called containers.
Definition: container.h:44
Analitza::Object
Definition: object.h:38
Analitza::StringExpressionWriter::result
QVariant result() const
Definition: stringexpressionwriter.h:52
Analitza::List
Definition: list.h:34
Analitza::Apply
This class is the one that will correspond to MathML apply tags.
Definition: apply.h:41
Analitza::StringExpressionWriter::weight
static int weight(const Analitza::Operator *op, int size, int pos)
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