UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
GraphDrawer.h
1 /***************************************************************************
2  * Copyright (C) 2006 by Vitali Kozioura *
3  * Copyright (C) 2014 by Jan Stückrath <jan.stueckrath@uni-due.de> *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
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 *
13  * GNU 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 *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin St, Fifth Floor, Boston, MA 02110, USA *
19  ***************************************************************************/
20 
21 #ifndef GRAPHDRAWER_H
22 #define GRAPHDRAWER_H
23 
24 #include "../graphs/AnonHypergraph.h"
25 
26 namespace uncover {
27  namespace io {
28 
37  {
38 
39  public:
40 
51 
56  enum BorderStyle {
65 
69  virtual ~GraphDrawer();
70 
80  static void writeGraphToDotFile(
81  graphs::AnonHypergraph const& graph,
82  string filename,
83  unordered_map<IDType,string> const& labels = (unordered_map<IDType,string>()),
84  unordered_map<IDType,GraphDrawer::BorderStyle> const& borderStyles = (unordered_map<IDType, GraphDrawer::BorderStyle>()));
85 
97  static void convertDotTo(string dotFile, string outFile, PictureFormat format, bool genExt = false);
98 
104  static string getStandardExtension(PictureFormat format);
105 
106  private:
107 
111  GraphDrawer();
112 
118  static string BorderStyleToString(GraphDrawer::BorderStyle style);
119 
120  };
121 
122  };
123 };
124 
125 #endif
PictureFormat
This enumeration specifies all supported picture formats.
Definition: GraphDrawer.h:44
static string BorderStyleToString(GraphDrawer::BorderStyle style)
Generates a string representing the given BorderStyle in the 'dot' format.
Definition: GraphDrawer.cpp:157
Yellow color style.
Definition: GraphDrawer.h:64
Green color style.
Definition: GraphDrawer.h:60
GraphDrawer()
GraphDrawer is not instantiable (all methods are static).
Definition: GraphDrawer.cpp:34
PictureFormat for png graphics files.
Definition: GraphDrawer.h:48
PictureFormat for postscript files.
Definition: GraphDrawer.h:46
Red color style.
Definition: GraphDrawer.h:62
Blue color style.
Definition: GraphDrawer.h:58
BorderStyle
A collection of layouts used to distinguish different vertices and edges visually.
Definition: GraphDrawer.h:56
An AnonHypergraph is a data structure storing a hypergraph.
Definition: AnonHypergraph.h:43
static string getStandardExtension(PictureFormat format)
Returns the filename extension normally used for the given picture format.
Definition: GraphDrawer.cpp:137
static void convertDotTo(string dotFile, string outFile, PictureFormat format, bool genExt=false)
Takes the given 'dot' file and converts it to a picture file using neato.
Definition: GraphDrawer.cpp:116
static void writeGraphToDotFile(graphs::AnonHypergraph const &graph, string filename, unordered_map< IDType, string > const &labels=(unordered_map< IDType, string >()), unordered_map< IDType, GraphDrawer::BorderStyle > const &borderStyles=(unordered_map< IDType, GraphDrawer::BorderStyle >()))
Takes the given Hypergraph and converts it to the 'dot' format.
Definition: GraphDrawer.cpp:38
This class provides static methods for Converting GXL files to the 'dot' format.
Definition: GraphDrawer.h:36
virtual ~GraphDrawer()
Destroys an instance of GraphDrawer.
Definition: GraphDrawer.cpp:36
PictureFormat for pdf graphics files.
Definition: GraphDrawer.h:50