Browse Source

output operators for element type

Former-commit-id: 8298f03f5e
tempestpy_adaptions
sjunges 9 years ago
parent
commit
6b166952e8
  1. 34
      src/storage/dft/DFTElementType.h

34
src/storage/dft/DFTElementType.h

@ -6,7 +6,6 @@ namespace storm {
enum class DFTElementType : int {AND = 0, OR = 2, VOT = 3, BE = 4, CONSTF = 5, CONSTS = 6, PAND = 7, SPARE = 8, POR = 9, PDEP = 10, SEQ = 11, MUTEX=12}; enum class DFTElementType : int {AND = 0, OR = 2, VOT = 3, BE = 4, CONSTF = 5, CONSTS = 6, PAND = 7, SPARE = 8, POR = 9, PDEP = 10, SEQ = 11, MUTEX=12};
inline bool isGateType(DFTElementType const& tp) { inline bool isGateType(DFTElementType const& tp) {
switch(tp) { switch(tp) {
case DFTElementType::AND: case DFTElementType::AND:
@ -29,7 +28,6 @@ namespace storm {
} }
} }
inline bool isStaticGateType(DFTElementType const& tp) { inline bool isStaticGateType(DFTElementType const& tp) {
if(!isGateType(tp)) return false; if(!isGateType(tp)) return false;
switch(tp) { switch(tp) {
@ -47,6 +45,38 @@ namespace storm {
} }
} }
inline std::string toString(DFTElementType const& tp) {
switch(tp) {
case DFTElementType::BE:
return "BE";
case DFTElementType::OR:
return "OR";
case DFTElementType::AND:
return "AND";
case DFTElementType::VOT:
return "VOT";
case DFTElementType::POR:
return "POR";
case DFTElementType::PAND:
return "PAND";
case DFTElementType::SPARE:
return "SPARE";
case DFTElementType::SEQ:
return "SEQ";
case DFTElementType::MUTEX:
return "MUTEX";
case DFTElementType::PDEP:
return "PDEP";
default:
assert(false);
}
}
inline std::ostream& operator<<(std::ostream& os, DFTElementType const& tp) {
return os << toString(tp) << std::endl;
}
} }
} }

Loading…
Cancel
Save