• 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
analitzautils.h
Go to the documentation of this file.
1 /*************************************************************************************
2  * Copyright (C) 2007-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 ANALITZAUTILS_H
20 #define ANALITZAUTILS_H
21 
22 #include <QStringList>
23 #include "object.h"
24 #include "analitzaexport.h"
25 
26 namespace Analitza
27 {
28 class Object;
29 class Container;
30 class Variables;
31 class Expression;
32 class Apply;
33 class List;
34 class Operator;
35 }
36 
45 namespace AnalitzaUtils
46 {
47 
49  void ANALITZA_EXPORT objectWalker(const Analitza::Expression& o, const QByteArray& prefix=QByteArray());
50 
52  QVariant ANALITZA_EXPORT expressionToVariant(const Analitza::Expression& res);
53 
55  Analitza::Expression ANALITZA_EXPORT variantToExpression(const QVariant& v);
56 
57  QString ANALITZA_EXPORT generateDependencyGraph(const Analitza::Variables* v);
58 
59  bool hasTheVar(const QSet<QString>& vars, const Analitza::Object * o);
60  bool hasTheVar(const QSet<QString>& vars, const Analitza::Apply * a);
61  bool hasTheVar(const QSet<QString>& vars, const Analitza::Container * c);
62 
63  bool isLambda(const Analitza::Object* o);
64  ANALITZA_EXPORT QStringList dependencies(const Analitza::Object* o, const QStringList& scope);
65 
68  bool hasVars(const Analitza::Object* o,
69  const QStringList& bvars=QStringList());
70 
72  bool equalTree(const Analitza::Object * o1, const Analitza::Object * o2);
73 
75  void objectWalker(const Analitza::Object* o, const QByteArray& prefix=QByteArray());
76 
77  QString listToString(const Analitza::List* list);
78 
79  Analitza::Object* replaceDepth(int depth, Analitza::Object* tree, Analitza::Object* towhat);
80 
82  int countDepth(int depth, const Analitza::Object* tree);
83 }
84 
85 #endif // ANALITZAUTILS_H
AnalitzaUtils::hasVars
bool hasVars(const Analitza::Object *o, const QStringList &bvars=QStringList())
Returns whether there is any variable in the o tree.
QByteArray
AnalitzaUtils::hasTheVar
bool hasTheVar(const QSet< QString > &vars, const Analitza::Object *o)
AnalitzaUtils::variantToExpression
Analitza::Expression ANALITZA_EXPORT variantToExpression(const QVariant &v)
Creates an expression out of a QVariant v, it will assert if it's not the correct type...
AnalitzaUtils::countDepth
int countDepth(int depth, const Analitza::Object *tree)
tells how much depth is being used inside tree
AnalitzaUtils::expressionToVariant
QVariant ANALITZA_EXPORT expressionToVariant(const Analitza::Expression &res)
Creates a QVariant out of an Expression res.
AnalitzaUtils::replaceDepth
Analitza::Object * replaceDepth(int depth, Analitza::Object *tree, Analitza::Object *towhat)
QSet< QString >
QString
AnalitzaUtils::dependencies
ANALITZA_EXPORT QStringList dependencies(const Analitza::Object *o, const QStringList &scope)
QStringList
AnalitzaUtils::generateDependencyGraph
QString ANALITZA_EXPORT generateDependencyGraph(const Analitza::Variables *v)
Analitza::Variables
Stores the variables in a hash map and make them available.
Definition: variables.h:42
analitzaexport.h
Analitza::Container
Container represents special tags of MathML called containers.
Definition: container.h:44
Analitza::Object
Definition: object.h:38
object.h
ANALITZA_EXPORT
#define ANALITZA_EXPORT
Definition: analitzaexport.h:31
AnalitzaUtils::listToString
QString listToString(const Analitza::List *list)
Analitza::Expression
Represents a mathematical expression.
Definition: expression.h:45
AnalitzaUtils::objectWalker
void ANALITZA_EXPORT objectWalker(const Analitza::Expression &o, const QByteArray &prefix=QByteArray())
Convenience function.
Analitza::List
Definition: list.h:34
Analitza::Apply
This class is the one that will correspond to MathML apply tags.
Definition: apply.h:41
AnalitzaUtils::isLambda
bool isLambda(const Analitza::Object *o)
AnalitzaUtils::equalTree
bool equalTree(const Analitza::Object *o1, const Analitza::Object *o2)
Returns whether o1 is equal to o2.
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