51 struct OgmlNodeTemplate;
52 struct OgmlEdgeTemplate;
54 struct OgmlLabelTemplate;
59 class OgmlAttributeValue;
63 friend ostream&
operator<<(ostream& os,
const OgmlParser::OgmlAttribute& oa);
64 friend ostream&
operator<<(ostream& os,
const OgmlParser::OgmlTag& ot);
240 return doRead(is, G,
nullptr,
nullptr,
nullptr);
251 return doRead(is, G, &CG,
nullptr,
nullptr);
266 return doRead(is, G,
nullptr, &GA,
nullptr);
283 return doRead(is, G, &CG, &CGA, &CGA);
bool isGraphHierarchical(const XmlTagObject *xmlTag) const
Returns true iff subgraph is an hierarchical graph.
Objects of this class represent a validating parser for files in Ogml.
Hashing< int, OgmlTag > * m_tags
Hashtable for saving all ogml tags.
Derived class of GraphObserver providing additional functionality to handle clustered graphs...
Hashing< int, string > m_edgeIds
bool isNodeHierarchical(const XmlTagObject *xmlTag) const
Returns true iff node contains other nodes.
Data type for general directed graphs (adjacency list representation).
int getArrowStyleAsInt(string s)
Hashing< string, node > m_nodes
bool read(istream &is, Graph &G, GraphAttributes &GA)
Reads a graph G with attributes GA from istream is in OGML format.
FillPattern getFillPattern(string s)
Returns fill pattern of string s.
Declaration of classes used for hashing.
Contains diverse enumerations and string constants.
Hashing< int, OgmlAttributeValue > * m_attValues
Hashtable for saving all values of ogml attributes.
Hashing< string, const XmlTagObject * > m_ids
Saves all ids of an ogml-file.
FillPattern
Fill patterns.
EdgeArrow
Types for edge arrows.
Hashing< int, OgmlAttribute > * m_attributes
Hashtable for saving all ogml attributes.
bool buildCluster(const XmlTagObject *rootTag, Graph &G, ClusterGraph &CG)
Builds a cluster graph.
GraphType
This enumeration is used for identifying graph types.
string getLabelCaptionFromString(string str)
Hashing< string, DPoint > m_points
string getNodeTemplateFromOgmlValue(string s)
Maps the OGML attribute values to corresponding GDE values.
Representation of clustered graphs.
OgmlParser()
Constructs an OGML parser.
Shape getShape(string s)
Returns the shape as an integer value.
Contains the struct declarations XmlAttributeObject, XmlTagObject and the class XmlParser.
Shape
Types for node shapes.
bool getIdFromString(string str, int &id)
Returns the integer value of the id at the end of the string (if it exists).
friend ostream & operator<<(ostream &os, const OgmlParser::OgmlAttribute &oa)
This struct represents a node in the XML parse tree.
Stores additional attributes of a graph (like layout information).
bool checkGraphType(const XmlTagObject *xmlTag) const
Checks the graph type and stores it in the member variable m_graphType xmlTag has to be the root or t...
void printValidityInfo(const OgmlTag &ot, const XmlTagObject &xto, int valStatus, int line)
Prints some useful information about un-/successful validation.
bool setLabelsRecursive(Graph &G, GraphAttributes &GA, ClusterGraphAttributes *pCGA, XmlTagObject *root)
Recursive method for setting labels of clusters and nodes.
bool buildGraph(Graph &G)
Builds a graph; ignores nodes which have hierarchical structure.
Stores additional attributes of a clustered graph (like layout information).
Hashing< string, OgmlEdgeTemplate * > m_ogmlEdgeTemplates
Hashing< string, edge > m_edges
bool doRead(istream &is, Graph &G, ClusterGraph *pCG, GraphAttributes *pGA, ClusterGraphAttributes *pCGA)
Unified read method for graphs.
int validate(const XmlTagObject *xmlTag, int ogmlTag)
Checks if all tags (XmlTagObject), their attributes (XmlAttributeObject) and their values are valid (...
bool addAttributes(Graph &G, GraphAttributes &GA, ClusterGraphAttributes *pCGA, const XmlTagObject *root)
Build a cluster graph with style/layout attributes.
Hashing< int, string > m_clusterIds
bool read(istream &is, Graph &G, ClusterGraph &CG)
Reads a cluster graph CG from istream is in OGML format.
XmlTagObject * m_constraintsTag
Declares ClusterGraphAttributes, an extension of class GraphAttributes, to store clustergraph layout ...
bool buildClusterRecursive(const XmlTagObject *xmlTag, cluster parent, Graph &G, ClusterGraph &CG)
Recursive part of buildCluster.
Representation of clusters in a clustered graph.
bool read(istream &is, Graph &G, ClusterGraph &CG, ClusterGraphAttributes &CGA)
Reads a cluster graph CG with attributes CGA from istream is in OGML format.
Ogml::GraphType m_graphType
Saves a graph type.
StrokeType
Line types of strokes.
Hashing< int, string > m_nodeIds
StrokeType getStrokeType(string s)
Returns the line type as an integer value.
Hashing< string, OgmlNodeTemplate * > m_ogmlNodeTemplates
The namespace for all OGDF objects.
EdgeArrow getArrowStyle(int i)
Hashing< string, cluster > m_clusters
Ogml::GraphType getGraphType()
bool read(istream &is, Graph &G)
Reads a graph G from istream is in OGML format.