UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GTXLReader Class Referenceabstract

This class imports GXL or GTXL XML files and converts them to Hypergraph and GTS objects respectively. More...

#include <GTXLReader.h>

Inheritance diagram for GTXLReader:
Inheritance graph
[legend]

Public Member Functions

virtual ~GTXLReader ()
 Destroys the GTXLReader object.
 
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. More...
 
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. More...
 
bool areWarningsShown ()
 Returns true, iff warnings will be logged when they occur. More...
 
void setWarningsShown (bool show)
 Sets whether warning will be logged when they occur. More...
 

Static Public Member Functions

static GTXLReadernewReader ()
 Use this method to generate a new GTXLReader object. More...
 
static unique_ptr< GTXLReadernewUniqueReader ()
 Use this method to generate a new GTXLReader object. More...
 

Protected Member Functions

 GTXLReader ()
 The default constructor is hidden. More...
 

Protected Attributes

bool showWarnings
 Specifies whether warnings for ignored XML nodes and attributes should be displayed or not.
 

Detailed Description

This class imports GXL or GTXL XML files and converts them to Hypergraph and GTS objects respectively.

Author
Jan Stückrath
See Also
graphs::Hypergraph
graphs::GTS

Constructor & Destructor Documentation

GTXLReader ( )
protected

The default constructor is hidden.

Use the static methods to generate a new GTXLReader object.

See Also
GTXLReader::newReader()
GTXLReader::newUniqueReader()

Member Function Documentation

bool areWarningsShown ( )

Returns true, iff warnings will be logged when they occur.

Returns
true, iff warnings will be shown
GTXLReader * newReader ( )
static

Use this method to generate a new GTXLReader object.

No initialization is needed before use.

Warning
The caller has to properly delete the GTXLReader after use to avoid memory leaks.
Returns
a pointer to a new GTXLReader object
unique_ptr< GTXLReader > newUniqueReader ( )
static

Use this method to generate a new GTXLReader object.

No initialization is needed before use.

Returns
a pointer to a new GTXLReader object
virtual graphs::GTS_sp readGTXL ( string  filename,
unordered_map< IDType, IDType > *  oldRuleIDs = nullptr,
unordered_map< IDType, IDType > *  oldGraphIDs = nullptr 
) const
pure virtual

This method takes a path to a GTXL XML-file and reads the stored GTS.

Parameters
filenamea complete path to a GTXL file
oldRuleIDsif given, this map will be filled with pairs of rule IDs mapped to (old) IDs read from the input files
oldGraphIDsif given, this map will be filled with pairs of graph IDs mapped to (old) IDs read from the input files
Returns
a pointer to the read GTS
Exceptions
io::XMLioExceptionif the specified file is not found or erroneous

Implemented in GTXLReaderXerces.

virtual shared_ptr<vector<graphs::Hypergraph_sp> > readGXL ( string  filename,
unordered_map< IDType, IDType > *  oldIDs = nullptr 
) const
pure virtual

This method takes a path to a GXL XML-file and reads all hypergraphs stored in it.

Parameters
filenamea complete path to a GXL file
oldIDsif given, this map will be filled with pairs of graph IDs mapped to (old) IDs read from the input files
Returns
a pointer to a vector of the graphs read
Exceptions
io::XMLioExceptionif the specified file is not found or erroneous

Implemented in GTXLReaderXerces.

void setWarningsShown ( bool  show)

Sets whether warning will be logged when they occur.

Parameters
showset to true, if warnings should be logged

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