rocs/RocsCore
GraphStructure.cpp
Go to the documentation of this file.
51 boost::shared_ptr<GraphStructure> ds = boost::static_pointer_cast<GraphStructure>(Rocs::GraphStructure::create(parent));
325 edges[counter] = Edge(node_mapping[p->from()->identifier()], node_mapping[p->to()->identifier()]);
326 edge_mapping[std::make_pair < int, int > (node_mapping[p->from()->identifier()], node_mapping[p->to()->identifier()])] = p;
335 edges[counter] = Edge(node_mapping[p->to()->identifier()], node_mapping[p->from()->identifier()]);
336 edge_mapping[std::make_pair< int, int >(node_mapping[p->to()->identifier()], node_mapping[p->from()->identifier()])] = p;
390 if (KMessageBox::warningContinueCancel(0, i18n("This action will probably remove some edges. Do you want to continue?")) != KMessageBox::Continue) {
425 bool directed = document()->pointerType(pointerType)->direction() == PointerType::Unidirectional;
430 emit scriptError(i18n("Could not add back-edge (%1->%2) to undirected graph.", from->identifier(), to->identifier()));
441 i18n("Could not add existing edge (%1->%2): this graph is no multigraph.", from->identifier(), to->identifier()));
469 void Rocs::GraphStructure::setPluginProperty(const QString& identifier, const QString& property)
Q_INVOKABLE QScriptValue edges()
Returns a list of all edges of the graph.
Definition: GraphStructure.cpp:115
boost::adjacency_list< boost::listS, boost::vecS, boost::undirectedS, boost::property< boost::vertex_name_t, std::string > > Graph
Definition: Topology.cpp:45
PointerPtr createPointer(DataPtr from, DataPtr to, int pointerType)
Internal method to create new graph edge.
Definition: GraphStructure.cpp:423
Definition: GraphStructure.h:29
iterator insert(const Key &key, const T &value)
Definition: PointerType.h:48
bool contains(const Key &key) const
Definition: DataStructure.h:43
DataPtr createData(const QString &name, int dataType)
Internal method to create new graph node.
Definition: GraphStructure.cpp:450
iterator begin()
QScriptValue add_edge(Data *fromRaw, Data *toRaw)
Creates a new edge from.
Definition: GraphStructure.cpp:227
QMap< QString, QString > pluginProperties() const
Gives a map with plugin specific properties of the data structure.
Definition: GraphStructure.cpp:462
GRAPH_TYPE graphType() const
Returns type of the graph given by enum.
Definition: GraphStructure.cpp:413
QScriptValue list_nodes()
Returns a list of all nodes of the graph.
Definition: GraphStructure.cpp:185
QScriptValue distances(Data *fromRaw)
Computes the Dijkstra's shortest path algorithm to compute all shortest path distances from from...
Definition: GraphStructure.cpp:262
QScriptValue call(const QScriptValue &thisObject, const QScriptValueList &args)
Q_INVOKABLE QScriptValue createNode()
Creates a new data element and return it.
Definition: GraphStructure.cpp:135
Definition: PointerType.h:47
QScriptValue add_overlay_edge(Data *fromRaw, Data *toRaw, int overlay)
Creates a new overlay edge from.
Definition: GraphStructure.cpp:235
QMap< DataPtr, PointerList > dijkstraShortestPaths(DataPtr from)
Computes the Dijkstra's shortest path algorithm to compute all shortest path distances from from...
Definition: GraphStructure.cpp:294
QScriptValue dijkstra_shortest_path(Data *fromRaw, Data *toRaw)
Computes the Dijkstra's shortest path algorithm to compute the shortes path from. ...
Definition: GraphStructure.cpp:243
static DataPtr create(DataStructurePtr parent, int uniqueIdentifier, int dataType)
Definition: GraphNode.cpp:26
int count(const T &value) const
QScriptValue overlay_edges(int overlay)
Gives array of edges of specified overlay.
Definition: GraphStructure.cpp:177
void append(const T &value)
int toInt(bool *ok, int base) const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
QScriptValue add_node(const QString &name)
Creates a new node with specified.
Definition: GraphStructure.cpp:217
QScriptValue property(const QString &name, const ResolveFlags &mode) const
iterator end()
const T value(const Key &key) const
void setPluginProperty(const QString &identifier, const QString &property)
Set plugin specific properties of data structure.
Definition: GraphStructure.cpp:469
virtual PointerPtr createPointer(DataPtr from, DataPtr to, int pointerType)
Creates new pointer from data element "from" to data element "to" of given type "pointerType".
Definition: DataStructure.cpp:393
Definition: Document.h:41
static DataStructurePtr create(Document *parent)
Definition: GraphStructure.cpp:44
void importStructure(DataStructurePtr other)
overwrites the current DataStructure with all values (Data and Pointer) from the given datastructure ...
Definition: GraphStructure.cpp:63
bool setProperty(const char *name, const QVariant &value)
iterator insert(const Key &key, const T &value)
GraphStructure(Document *parent=0)
Definition: GraphStructure.cpp:57
Definition: GraphNode.h:24
QScriptValue list_edges()
Returns a list of all edges of the graph.
Definition: GraphStructure.cpp:201
QObject * parent() const
Q_INVOKABLE QScriptValue nodes()
Returns a list of all nodes of the graph.
Definition: GraphStructure.cpp:95
Definition: GraphStructure.h:36
iterator begin()
Q_INVOKABLE QScriptValue createEdge(Data *fromRaw, Data *toRaw, int type)
Creates a new edge edge from.
Definition: GraphStructure.cpp:152
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.