Browse Source

add new class files

Former-commit-id: 76f60aa718
tempestpy_adaptions
ThomasH 9 years ago
parent
commit
4c8e29d620
  1. 5
      src/parser/GspnParser.cpp
  2. 14
      src/parser/GspnParser.h
  3. 4
      src/storage/gspn/GSPN.cpp
  4. 5
      src/storage/gspn/GSPN.h

5
src/parser/GspnParser.cpp

@ -0,0 +1,5 @@
#include "src/parser/GspnParser.h"
storm::gspn::GSPN storm::parser::GspnParser::parse(const std::string &filename) {
return storm::gspn::GSPN();
}

14
src/parser/GspnParser.h

@ -1,9 +1,23 @@
#ifndef STORM_GSPNPARSER_H #ifndef STORM_GSPNPARSER_H
#define STORM_GSPNPARSER_H #define STORM_GSPNPARSER_H
#include <string>
#include "src/storage/gspn/GSPN.h"
namespace storm { namespace storm {
namespace parser { namespace parser {
// Parses a GSPN in xml format // Parses a GSPN in xml format
class GspnParser {
public:
/*!
* Parses the given file into the GSPN storage class assuming it complies with the PNML.
*
* @param filename The name of the file to parse
* @return The resulting GSPN.
*/
static storm::gspn::GSPN parse(std::string const& filename);
private:
};
} }
} }

4
src/storage/gspn/GSPN.cpp

@ -0,0 +1,4 @@
#include "src/storage/gspn/GSPN.h"
storm::gspn::GSPN::GSPN() : initialMarking(0, 0) {
}

5
src/storage/gspn/GSPN.h

@ -14,6 +14,11 @@ namespace storm {
// Later, the rates and probabilities type should become a template, for now, let it be doubles. // Later, the rates and probabilities type should become a template, for now, let it be doubles.
typedef double RateType; typedef double RateType;
typedef double WeightType; typedef double WeightType;
/*!
* The empty constructor creates an GSPN without transition and places
*/
GSPN();
private: private:
// set containing all immediate transitions // set containing all immediate transitions
std::vector<storm::gspn::ImmediateTransition<WeightType>> immediateTransitions; std::vector<storm::gspn::ImmediateTransition<WeightType>> immediateTransitions;

Loading…
Cancel
Save