UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
GTXLWriter.h
1 /***************************************************************************
2  * Copyright (C) 2014 by Jan Stückrath <jan.stueckrath@uni-due.de> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with this program; if not, write to the *
16  * Free Software Foundation, Inc., *
17  * 51 Franklin St, Fifth Floor, Boston, MA 02110, USA *
18  ***************************************************************************/
19 
20 #ifndef GTXLWRITER_H_
21 #define GTXLWRITER_H_
22 
23 #include "../graphs/GTS.h"
24 #include <memory>
25 #include <boost/filesystem.hpp>
26 
27 namespace uncover {
28  namespace io {
29 
34  class GTXLWriter {
35 
36  public:
37 
41  virtual ~GTXLWriter();
42 
49  virtual void writeGXL(vector<graphs::Hypergraph_sp> const& graphs, string filename) const;
50 
57  virtual void writeGXL(vector<graphs::Hypergraph_sp> const& graphs, boost::filesystem::path& filename) const = 0;
58 
65  virtual void writeGXL(graphs::Hypergraph_sp graph, string filename) const;
66 
73  virtual void writeGXL(graphs::Hypergraph_sp graph, boost::filesystem::path& filename) const;
74 
81  virtual void writeGTXL(graphs::GTS const& gts, string filename) const;
82 
89  virtual void writeGTXL(graphs::GTS const& gts, boost::filesystem::path& filename) const = 0;
90 
95  void setGraphIDStorage(bool value);
96 
101  bool getGraphIDStorage() const;
102 
107  void setRuleIDStorage(bool value);
108 
113  bool getRuleIDStorage() const;
114 
120  static GTXLWriter* newWriter();
121 
126  static unique_ptr<GTXLWriter> newUniqueWriter();
127 
128  protected:
129 
133  GTXLWriter();
134 
140 
146 
147  };
148 
149  } /* namespace io */
150 } /* namespace uncover */
151 
152 #endif /* GTXLWRITER_H_ */
virtual ~GTXLWriter()
Destroys the GTXLWriter object.
Definition: GTXLWriter.cpp:39
static unique_ptr< GTXLWriter > newUniqueWriter()
Use this method to generate a new GTXLWriter object.
Definition: GTXLWriter.cpp:33
void setRuleIDStorage(bool value)
Sets whether internal rule IDs should be stores in the resulting file.
Definition: GTXLWriter.cpp:70
virtual void writeGXL(vector< graphs::Hypergraph_sp > const &graphs, string filename) const
This method takes a collection of Hypergraphs and stores the collection as a GXL XML-file with the gi...
Definition: GTXLWriter.cpp:41
This class exports GXL or GTXL XML files by converting them from Hypergraph and GTS objects respectiv...
Definition: GTXLWriter.h:34
static GTXLWriter * newWriter()
Use this method to generate a new GTXLWriter object.
Definition: GTXLWriter.cpp:29
bool storeGraphIDs
A value of true will cause the internally used ID of a graph to be stored as its name in the exported...
Definition: GTXLWriter.h:139
void setGraphIDStorage(bool value)
Sets whether the graph IDs used internally will be stored in the resulting file.
Definition: GTXLWriter.cpp:62
bool getRuleIDStorage() const
Returns whether internal rule IDs will be exported.
Definition: GTXLWriter.cpp:74
The GTS class is the data structure for a graph transformation system.
Definition: GTS.h:36
bool storeRuleIDs
A value of true will cause the internally used ID of a rule to be stored as its name in the exported ...
Definition: GTXLWriter.h:145
virtual void writeGTXL(graphs::GTS const &gts, string filename) const
This method takes a GTS object and stores it as a GTXL XML-file with the given filename.
Definition: GTXLWriter.cpp:57
GTXLWriter()
The default constructor is hidden.
Definition: GTXLWriter.cpp:37
shared_ptr< Hypergraph > Hypergraph_sp
Alias for a shared pointer to a Hypergraph.
Definition: Hypergraph.h:85
bool getGraphIDStorage() const
Returns whether internal graph IDs will be exported.
Definition: GTXLWriter.cpp:66