DDD 1.9.0.20250409152518
dotExporter.h
Go to the documentation of this file.
1/****************************************************************************/
2/* */
3/* This file is part of libDDD, a library for manipulation of DDD and SDD. */
4/* */
5/* Copyright (C) 2004-2008 Yann Thierry-Mieg */
6/* */
7/* This program is free software; you can redistribute it and/or modify */
8/* it under the terms of the GNU Lesser General Public License as */
9/* published by the Free Software Foundation; either version 3 of the */
10/* License, or (at your option) any later version. */
11/* This program is distributed in the hope that it will be useful, */
12/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14/* GNU LEsserGeneral Public License for more details. */
15/* */
16/* You should have received a copy of the GNU Lesser General Public License */
17/* along with this program; if not, write to the Free Software */
18/*Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19/* */
20/****************************************************************************/
21
22#ifndef __DOTEXPORTER__H__
23#define __DOTEXPORTER__H__
24
25
26#include "ddd/SDD.h"
27#include "ddd/DDD.h"
28using namespace std;
29
30
31/* exports a SDD g into the file specified by path.
32 * If hierarchical is true, single dot file is produced with dashed lines to represent arc values.
33 * The default produces one graph xxx.dot with SDD and another with DDD d3XXX.dot
34 */
35int exportDot(const GSDD & g, const string & path="test",bool hierarchical=false, bool multiT=true);
36
37
38/* Exports the full unique table of SDD into a dot file specified by path.
39 * Highlights nodes that belong to the SDD provided.
40 * NB : avoid if unique table size is too large...
41 **/
42void exportUniqueTable ( const GSDD & d, const string & path="table" );
43
44class dotExporter;
45
48 class dotExporter * de;
49public:
50 virtual ~dotHighlight ();
51 // prepares to export in file named "path"
52 dotHighlight (const string & path);
53 // Call this to empty the "known nodes" lists
54 void initialize (const string & path);
55 // Sets the vars to be aligned
56 void setVarAlignment (bool isAligned);
57 // This adds an SDD node and all sons to a graph
58 void addSDD (const GSDD & g);
59 // This adds an SDD node and names it with the provided label
60 void addSDD (const GSDD & g, const string &label);
61 // This changes the color of a node and sons
62 void setColor(const GSDD & g, const string & color);
63 // This creates the actual file
64 void exportDot();
65};
66
67
68#endif
This class is the base class representing a hierarchical Set Decision Diagram.
Definition SDD.h:49
Definition dotExporter.cpp:32
a more evolved API for highlighting parts of a graph
Definition dotExporter.h:47
void setColor(const GSDD &g, const string &color)
Definition dotExporter.cpp:494
void addSDD(const GSDD &g)
Definition dotExporter.cpp:482
void setVarAlignment(bool isAligned)
Definition dotExporter.cpp:477
void exportDot()
Definition dotExporter.cpp:499
class dotExporter * de
Definition dotExporter.h:48
void initialize(const string &path)
Definition dotExporter.cpp:474
virtual ~dotHighlight()
Definition dotExporter.cpp:471
void exportUniqueTable(const GSDD &d, const string &path="table")
int exportDot(const GSDD &g, const string &path="test", bool hierarchical=false, bool multiT=true)
Definition dotExporter.cpp:455
Definition DDD.h:340

Please comment this page and report errors about it on the RefDocComments page.
Generated on Wed Apr 9 2025 15:27:42 for DDD by doxygen 1.9.8