Browse Source

Refactored info module

Former-commit-id: 9ff28bed73
tempestpy_adaptions
Mavo 9 years ago
parent
commit
4620bd3ca2
  1. 12
      src/python/storm-info.cpp
  2. 7
      stormpy/src/info/common.h
  3. 13
      stormpy/src/info/info.cpp
  4. 8
      stormpy/src/info/info.h
  5. 10
      stormpy/src/mod_info.cpp

12
src/python/storm-info.cpp

@ -1,12 +0,0 @@
#include <boost/python.hpp>
#include "../utility/storm-version.h"
BOOST_PYTHON_MODULE(_info)
{
using namespace boost::python;
class_<storm::utility::StormVersion>("Version")
.def("short", &storm::utility::StormVersion::shortVersionString)
.def("long", &storm::utility::StormVersion::longVersionString)
.def("build_info", &storm::utility::StormVersion::buildInfo)
;
}

7
stormpy/src/info/common.h

@ -1,7 +0,0 @@
#ifndef PYTHON_INFO_COMMON_H_
#define PYTHON_INFO_COMMON_H_
//toString
#include "src/helpers.h"
#endif /* PYTHON_INFO_COMMON_H_ */

13
stormpy/src/info/info.cpp

@ -1,13 +0,0 @@
#include "info.h"
#include "common.h"
#include <src/utility/storm-version.h>
void define_info(py::module& m) {
py::class_<storm::utility::StormVersion>(m, "Version")
.def("short", &storm::utility::StormVersion::shortVersionString)
.def("long", &storm::utility::StormVersion::longVersionString)
.def("build_info", &storm::utility::StormVersion::buildInfo)
;
}

8
stormpy/src/info/info.h

@ -1,8 +0,0 @@
#ifndef PYTHON_INFO_INFO_H_
#define PYTHON_INFO_INFO_H_
#include "src/common.h"
void define_info(py::module& m);
#endif /* PYTHON_INFO_INFO_H_ */

10
stormpy/src/mod_info.cpp

@ -1,10 +1,14 @@
#include "common.h"
#include "helpers.h"
#include "info/info.h"
#include <src/utility/storm-version.h>
PYBIND11_PLUGIN(info) {
py::module m("stormpy.info", "stormpy info handling");
define_info(m);
py::module m("stormpy.info", "Storm information");
py::class_<storm::utility::StormVersion>(m, "Version", "Version information for Storm")
.def("short", &storm::utility::StormVersion::shortVersionString, "Storm version in short representation")
.def("long", &storm::utility::StormVersion::longVersionString, "Storm version in long representation")
.def("build_info", &storm::utility::StormVersion::buildInfo, "Build info for Storm")
;
return m.ptr();
}
Loading…
Cancel
Save