• 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
  • dotFileFormat
DotGraphParsingHelper.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  KGraphViewer 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 #ifndef DOT_GRAPHPARSINGHELPER_H
22 #define DOT_GRAPHPARSINGHELPER_H
23 
24 #include <QStringList>
25 #include <DataStructure.h>
26 #include "DataStructures/Graph/GraphStructure.h"
27 #include <Data.h>
28 #include <Document.h>
29 #include <Pointer.h>
30 
31 #include <QObject>
32 namespace DotParser
33 {
34 
35 struct DotGraphParsingHelper {
36  typedef QMap<QString,QString> AttributesMap;
37 
38  DotGraphParsingHelper();
39 
43  void createData(QString identifier);
44 
49  void createSubDataStructure();
50 
55  void leaveSubDataStructure();
56  void setDataStructureAttributes();
57  void setSubDataStructureAttributes();
58  void setSubDataStructureId(QString identifier);
59  void setDataAttributes();
60  void setPointerAttributes();
61 
66  void applyAttributedList();
67 
68  void createPointers();
69  void addEdgeBound(QString bound) {
70  edgebounds.append(bound);
71  }
72  void setObjectAttributes(QObject *graphElement, const DotParser::DotGraphParsingHelper::AttributesMap &attributes);
73 
74  QString attributeId;
75  QString valid;
76  std::string attributed; //FIXME change to enum
77 
78  AttributesMap unprocessedAttributes;
79  AttributesMap dataStructureAttributes;
80  AttributesMap dataAttributes;
81  AttributesMap pointerAttributes;
82  QList< AttributesMap > dataStructureAttributeStack;
83  QList< AttributesMap > dataAttributeStack;
84  QList< AttributesMap > pointerAttributeStack;
85 
86  QStringList edgebounds;
87 
88  boost::shared_ptr<Rocs::GraphStructure> dataStructure;
89 
90  QList<GroupPtr> groupStack; // stack of groups, increased each time a new group is entered
91 
92  DataPtr currentDataPtr;
93  PointerPtr currentPointerPtr;
94  Document* gd; // graph document of type "Graph", ensured when document is created
95  QMap<QString, DataPtr> dataMap; // for mapping data element ids
96 };
97 
98 }
99 
100 #endif
101 
102 
103 
DotParser::DotGraphParsingHelper::groupStack
QList< GroupPtr > groupStack
Definition: DotGraphParsingHelper.h:90
DotParser::DotGraphParsingHelper::applyAttributedList
void applyAttributedList()
Generates a new attribute list from all unprocessed attributes and set the corresponding attribute li...
Definition: DotGraphParsingHelper.cpp:93
DotParser::DotGraphParsingHelper::pointerAttributes
AttributesMap pointerAttributes
Definition: DotGraphParsingHelper.h:81
DotParser::DotGraphParsingHelper::valid
QString valid
Definition: DotGraphParsingHelper.h:75
DotParser::DotGraphParsingHelper::unprocessedAttributes
AttributesMap unprocessedAttributes
Definition: DotGraphParsingHelper.h:78
DotParser::DotGraphParsingHelper::currentDataPtr
DataPtr currentDataPtr
Definition: DotGraphParsingHelper.h:92
DotParser::DotGraphParsingHelper::gd
Document * gd
Definition: DotGraphParsingHelper.h:94
DotParser::DotGraphParsingHelper::dataStructure
boost::shared_ptr< Rocs::GraphStructure > dataStructure
Definition: DotGraphParsingHelper.h:88
DotParser::DotGraphParsingHelper::setSubDataStructureAttributes
void setSubDataStructureAttributes()
Definition: DotGraphParsingHelper.cpp:73
QObject
Data.h
Document.h
GraphStructure.h
PointerPtr
boost::shared_ptr< Pointer > PointerPtr
Definition: CoreTypes.h:35
DotParser::DotGraphParsingHelper::attributed
std::string attributed
Definition: DotGraphParsingHelper.h:76
DataStructure.h
DotParser::DotGraphParsingHelper::dataStructureAttributeStack
QList< AttributesMap > dataStructureAttributeStack
Definition: DotGraphParsingHelper.h:82
DotParser::DotGraphParsingHelper::edgebounds
QStringList edgebounds
Definition: DotGraphParsingHelper.h:86
DotParser::DotGraphParsingHelper
Definition: DotGraphParsingHelper.h:35
DotParser::DotGraphParsingHelper::setSubDataStructureId
void setSubDataStructureId(QString identifier)
Definition: DotGraphParsingHelper.cpp:152
DotParser::DotGraphParsingHelper::leaveSubDataStructure
void leaveSubDataStructure()
Leaves current group, i.e., leave current sub data structure and switches focus to ancestor group or ...
Definition: DotGraphParsingHelper.cpp:163
DotParser::DotGraphParsingHelper::setObjectAttributes
void setObjectAttributes(QObject *graphElement, const DotParser::DotGraphParsingHelper::AttributesMap &attributes)
Definition: DotGraphParsingHelper.cpp:53
DotParser::DotGraphParsingHelper::pointerAttributeStack
QList< AttributesMap > pointerAttributeStack
Definition: DotGraphParsingHelper.h:84
Document
Definition: Document.h:41
DotParser::DotGraphParsingHelper::setDataStructureAttributes
void setDataStructureAttributes()
Definition: DotGraphParsingHelper.cpp:68
DotParser::DotGraphParsingHelper::dataAttributeStack
QList< AttributesMap > dataAttributeStack
Definition: DotGraphParsingHelper.h:83
DotParser::DotGraphParsingHelper::dataAttributes
AttributesMap dataAttributes
Definition: DotGraphParsingHelper.h:80
DotParser::DotGraphParsingHelper::setPointerAttributes
void setPointerAttributes()
Definition: DotGraphParsingHelper.cpp:85
DotParser::DotGraphParsingHelper::createData
void createData(QString identifier)
Creates new data element and registers the identifier in data map.
Definition: DotGraphParsingHelper.cpp:127
DotParser::DotGraphParsingHelper::DotGraphParsingHelper
DotGraphParsingHelper()
Definition: DotGraphParsingHelper.cpp:35
Pointer.h
DataPtr
boost::shared_ptr< Data > DataPtr
Definition: CoreTypes.h:34
DotParser::DotGraphParsingHelper::AttributesMap
QMap< QString, QString > AttributesMap
Definition: DotGraphParsingHelper.h:36
DotParser::DotGraphParsingHelper::dataMap
QMap< QString, DataPtr > dataMap
Definition: DotGraphParsingHelper.h:95
DotParser::DotGraphParsingHelper::currentPointerPtr
PointerPtr currentPointerPtr
Definition: DotGraphParsingHelper.h:93
DotParser::DotGraphParsingHelper::addEdgeBound
void addEdgeBound(QString bound)
Definition: DotGraphParsingHelper.h:69
DotParser::DotGraphParsingHelper::setDataAttributes
void setDataAttributes()
Definition: DotGraphParsingHelper.cpp:77
DotParser::DotGraphParsingHelper::dataStructureAttributes
AttributesMap dataStructureAttributes
Definition: DotGraphParsingHelper.h:79
DotParser::DotGraphParsingHelper::createSubDataStructure
void createSubDataStructure()
Creates new sub data structure and enters it.
Definition: DotGraphParsingHelper.cpp:145
DotParser::DotGraphParsingHelper::createPointers
void createPointers()
Definition: DotGraphParsingHelper.cpp:172
DotParser::DotGraphParsingHelper::attributeId
QString attributeId
Definition: DotGraphParsingHelper.h:74
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