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

rocs/RocsCore

  • sources
  • kde-4.12
  • kdeedu
  • rocs
  • RocsCore
  • LoadSave
  • Plugins
  • gmlFileFormat
GmlGraphParsingHelper.h
Go to the documentation of this file.
1 /*
2  This file is part of Rocs.
3  Copyright 2006-2007 Gael de Chalendar <kleag@free.fr>
4  Copyright 2012 Andreas Cord-Landwehr <cola@uni-paderborn.de>
5 
6  Rocs is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public
8  License as published by the Free Software Foundation, version 2.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  02110-1301, USA
19 */
20 
21 
22 #ifndef GML_GRAPHPARSINGHELPER_H
23 #define GML_GRAPHPARSINGHELPER_H
24 
25 #include <map>
26 #include <list>
27 #include <string>
28 #include <QStringList>
29 #include "DataStructure.h"
30 #include "Data.h"
31 #include "CoreTypes.h"
32 
33 #include <QObject>
34 
35 namespace GmlParser
36 {
37 struct GmlGraphParsingHelper {
38  enum State {begin, graph, node, edge};
39 
40  GmlGraphParsingHelper();
41 
42  void createNode();
43  void createEdge();
44  void createGraph();
45  void endList();
46  void startList(const QString& key);
47 
48  void setAttribute(const QString& key, const QString& value);
49  const QString processKey(const QString& key);
50  QString edgeSource;
51  QString edgeTarget;
52 
53  State _actualState;
54 
55  DataStructurePtr actualGraph;
56  DataPtr actualNode;
57  PointerPtr actualEdge;
58  Document* gd;
59  QStringList _properties;
60  QHash<QString, QString> _edgeProperties;
61  QMap<QString, DataPtr> dataMap; // for mapping data element ids
62 };
63 }
64 
65 #endif
66 
67 
68 
GmlParser::GmlGraphParsingHelper::node
Definition: GmlGraphParsingHelper.h:38
GmlParser::GmlGraphParsingHelper::_edgeProperties
QHash< QString, QString > _edgeProperties
Definition: GmlGraphParsingHelper.h:60
GmlParser::GmlGraphParsingHelper::endList
void endList()
Definition: GmlGraphParsingHelper.cpp:69
GmlParser::GmlGraphParsingHelper::actualNode
DataPtr actualNode
Definition: GmlGraphParsingHelper.h:56
GmlParser::GmlGraphParsingHelper::begin
Definition: GmlGraphParsingHelper.h:38
DataStructurePtr
boost::shared_ptr< DataStructure > DataStructurePtr
Definition: CoreTypes.h:38
GmlParser::GmlGraphParsingHelper::gd
Document * gd
Definition: GmlGraphParsingHelper.h:58
CoreTypes.h
GmlParser::GmlGraphParsingHelper::GmlGraphParsingHelper
GmlGraphParsingHelper()
Definition: GmlGraphParsingHelper.cpp:40
GmlParser::GmlGraphParsingHelper::dataMap
QMap< QString, DataPtr > dataMap
Definition: GmlGraphParsingHelper.h:61
Data.h
GmlParser::GmlGraphParsingHelper::_actualState
State _actualState
Definition: GmlGraphParsingHelper.h:53
GmlParser::GmlGraphParsingHelper::processKey
const QString processKey(const QString &key)
Definition: GmlGraphParsingHelper.cpp:91
PointerPtr
boost::shared_ptr< Pointer > PointerPtr
Definition: CoreTypes.h:35
GmlParser::GmlGraphParsingHelper::graph
Definition: GmlGraphParsingHelper.h:38
DataStructure.h
GmlParser::GmlGraphParsingHelper::_properties
QStringList _properties
Definition: GmlGraphParsingHelper.h:59
GmlParser::GmlGraphParsingHelper::actualEdge
PointerPtr actualEdge
Definition: GmlGraphParsingHelper.h:57
GmlParser::GmlGraphParsingHelper::setAttribute
void setAttribute(const QString &key, const QString &value)
Definition: GmlGraphParsingHelper.cpp:102
GmlParser::GmlGraphParsingHelper::actualGraph
DataStructurePtr actualGraph
Definition: GmlGraphParsingHelper.h:55
GmlParser::GmlGraphParsingHelper::edge
Definition: GmlGraphParsingHelper.h:38
Document
Definition: Document.h:41
DataPtr
boost::shared_ptr< Data > DataPtr
Definition: CoreTypes.h:34
GmlParser::GmlGraphParsingHelper::startList
void startList(const QString &key)
Definition: GmlGraphParsingHelper.cpp:50
GmlParser::GmlGraphParsingHelper::edgeTarget
QString edgeTarget
Definition: GmlGraphParsingHelper.h:51
GmlParser::GmlGraphParsingHelper::createGraph
void createGraph()
Definition: GmlGraphParsingHelper.cpp:160
GmlParser::GmlGraphParsingHelper::createNode
void createNode()
Definition: GmlGraphParsingHelper.cpp:169
GmlParser::GmlGraphParsingHelper::State
State
Definition: GmlGraphParsingHelper.h:38
GmlParser::GmlGraphParsingHelper::createEdge
void createEdge()
Definition: GmlGraphParsingHelper.cpp:179
GmlParser::GmlGraphParsingHelper::edgeSource
QString edgeSource
Definition: GmlGraphParsingHelper.h:50
GmlParser::GmlGraphParsingHelper
Definition: GmlGraphParsingHelper.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

rocs/RocsCore

Skip menu "rocs/RocsCore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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