Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
DftJsonExporter.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace storm::dft {
7namespace storage {
8
12template<typename ValueType>
14 typedef typename storm::json<double> Json;
15
16 using DFTElementCPointer = std::shared_ptr<storm::dft::storage::elements::DFTElement<ValueType> const>;
17 using DFTBECPointer = std::shared_ptr<storm::dft::storage::elements::DFTBE<ValueType> const>;
18
19 public:
25 static void toFile(storm::dft::storage::DFT<ValueType> const& dft, std::string const& filepath);
26
32 static void toStream(storm::dft::storage::DFT<ValueType> const& dft, std::ostream& os);
33
34 private:
40 static Json translate(storm::dft::storage::DFT<ValueType> const& dft);
41
47 static Json translateElement(DFTElementCPointer element);
48
56 static Json translateBE(DFTBECPointer element, Json nodeData);
57
63 static Json translateParameters(storm::dft::storage::DFT<ValueType> const& dft);
64};
65
66} // namespace storage
67} // namespace storm::dft
Represents a Dynamic Fault Tree.
Definition DFT.h:52
Exports a DFT into the JSON format.
static void toFile(storm::dft::storage::DFT< ValueType > const &dft, std::string const &filepath)
Export DFT to given file.
static void toStream(storm::dft::storage::DFT< ValueType > const &dft, std::ostream &os)
Export DFT to given stream.
nlohmann::basic_json< std::map, std::vector, std::string, bool, int64_t, uint64_t, ValueType > json
Definition JsonForward.h:10