UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
GraphDrawer Class Reference

This class provides static methods for Converting GXL files to the 'dot' format. More...

#include <GraphDrawer.h>

Public Types

enum  PictureFormat { PicPS, PicPNG, PicPDF }
 This enumeration specifies all supported picture formats. More...
 
enum  BorderStyle { BorderBlue, BorderGreen, BorderRed, BorderYellow }
 A collection of layouts used to distinguish different vertices and edges visually. More...
 

Public Member Functions

virtual ~GraphDrawer ()
 Destroys an instance of GraphDrawer.
 

Static Public Member Functions

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. More...
 
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. More...
 
static string getStandardExtension (PictureFormat format)
 Returns the filename extension normally used for the given picture format. More...
 

Private Member Functions

 GraphDrawer ()
 GraphDrawer is not instantiable (all methods are static).
 

Static Private Member Functions

static string BorderStyleToString (GraphDrawer::BorderStyle style)
 Generates a string representing the given BorderStyle in the 'dot' format. More...
 

Detailed Description

This class provides static methods for Converting GXL files to the 'dot' format.

This format can then be converted to several picture formats using the 'Graphviz' tool.

See Also
Graphviz homepage
Author
Jan Stückrath
Vitali Kozioura

Member Enumeration Documentation

A collection of layouts used to distinguish different vertices and edges visually.

BorderLayouts are used to visually distinguish multiple quantification in UQRules.

Enumerator
BorderBlue 

Blue color style.

BorderGreen 

Green color style.

BorderRed 

Red color style.

BorderYellow 

Yellow color style.

This enumeration specifies all supported picture formats.

Enumerator
PicPS 

PictureFormat for postscript files.

PicPNG 

PictureFormat for png graphics files.

PicPDF 

PictureFormat for pdf graphics files.

Member Function Documentation

string BorderStyleToString ( GraphDrawer::BorderStyle  style)
staticprivate

Generates a string representing the given BorderStyle in the 'dot' format.

Parameters
stylethe BorderStyle to be converted
Returns
the 'dot' parameter drawing a vertex or edge in the given BorderStyle
void convertDotTo ( string  dotFile,
string  outFile,
PictureFormat  format,
bool  genExt = false 
)
static

Takes the given 'dot' file and converts it to a picture file using neato.

Which picture file type should be used, must be specified. An optional parameter can be used to automatically append an appropriate file extension.

See Also
GraphDrawer::PictureFormat
Parameters
dotFilefilename of the 'dot' file to be converted (including extension)
outFilefilename of the output file (including extension)
formatthe picture format that will be generated
genExtif this parameter is true, the standard extension for the given format will be appended to the given output filename (default is false)
string getStandardExtension ( PictureFormat  format)
static

Returns the filename extension normally used for the given picture format.

Parameters
formatthe picture format for which the extension should be returned
Returns
the filename extension normally used for the given picture format
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<IDTypeGraphDrawer::BorderStyle>()) 
)
static

Takes the given Hypergraph and converts it to the 'dot' format.

Each element of the graph can be labeled with some given string and drawn in a special border style. The 'dot' file is stored using the given filename.

Parameters
graphthe Hypergraph to be converted
filenamethe filename used to store the 'dot' file (including extension)
labelsa map with up to one label for each drawn element
borderStylesa map assigning a BorderStyle to elements of the graph

The documentation for this class was generated from the following files: