UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
GTXLReader.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 GTXLREADER_H_
21 #define GTXLREADER_H_
22 
23 #include "../graphs/GTS.h"
24 
25 namespace uncover {
26  namespace io {
27 
34  class GTXLReader {
35 
36  public:
37 
41  virtual ~GTXLReader();
42 
51  virtual shared_ptr<vector<graphs::Hypergraph_sp>> readGXL(string filename,
52  unordered_map<IDType,IDType>* oldIDs = nullptr) const = 0;
53 
64  virtual graphs::GTS_sp readGTXL(string filename,
65  unordered_map<IDType,IDType>* oldRuleIDs = nullptr,
66  unordered_map<IDType,IDType>* oldGraphIDs = nullptr) const = 0;
67 
73  static GTXLReader* newReader();
74 
79  static unique_ptr<GTXLReader> newUniqueReader();
80 
85  bool areWarningsShown();
86 
91  void setWarningsShown(bool show);
92 
93  protected:
94 
100  GTXLReader();
101 
106 
107  };
108 
112  typedef unique_ptr<GTXLReader> GTXLReader_up;
113 
114  } /* namespace io */
115 } /* namespace uncover */
116 
117 #endif /* GTXLREADER_H_ */
void setWarningsShown(bool show)
Sets whether warning will be logged when they occur.
Definition: GTXLReader.cpp:42
virtual graphs::GTS_sp readGTXL(string filename, unordered_map< IDType, IDType > *oldRuleIDs=nullptr, unordered_map< IDType, IDType > *oldGraphIDs=nullptr) const =0
This method takes a path to a GTXL XML-file and reads the stored GTS.
bool areWarningsShown()
Returns true, iff warnings will be logged when they occur.
Definition: GTXLReader.cpp:38
virtual shared_ptr< vector< graphs::Hypergraph_sp > > readGXL(string filename, unordered_map< IDType, IDType > *oldIDs=nullptr) const =0
This method takes a path to a GXL XML-file and reads all hypergraphs stored in it.
This class imports GXL or GTXL XML files and converts them to Hypergraph and GTS objects respectively...
Definition: GTXLReader.h:34
static unique_ptr< GTXLReader > newUniqueReader()
Use this method to generate a new GTXLReader object.
Definition: GTXLReader.cpp:30
GTXLReader()
The default constructor is hidden.
Definition: GTXLReader.cpp:34
unique_ptr< GTXLReader > GTXLReader_up
Alias for a unique pointer to a GTXLReader.
Definition: GTXLReader.h:112
virtual ~GTXLReader()
Destroys the GTXLReader object.
Definition: GTXLReader.cpp:36
bool showWarnings
Specifies whether warnings for ignored XML nodes and attributes should be displayed or not...
Definition: GTXLReader.h:105
shared_ptr< GTS > GTS_sp
Alias for a shared pointer to a GTS object.
Definition: GTS.h:164
static GTXLReader * newReader()
Use this method to generate a new GTXLReader object.
Definition: GTXLReader.cpp:26