diff --git a/src/storm/shields/shield-handling.h b/src/storm/shields/shield-handling.h new file mode 100644 index 000000000..a53c7e8f6 --- /dev/null +++ b/src/storm/shields/shield-handling.h @@ -0,0 +1,31 @@ +#pragma once + +#include +#include +#include + +#include "storm/storage/Scheduler.h" +#include "storm/storage/BitVector.h" + +#include "storm/logic/ShieldExpression.h" + +#include "storm/shields/AbstractShield.h" +#include "storm/shields/PreSafetyShield.h" + +#include "storm/exceptions/InvalidArgumentException.h" + +namespace tempest { + namespace shields { + template + storm::storage::Scheduler createShield(std::vector const& rowGroupIndices, std::vector const& choiceValues, std::shared_ptr const& shieldingExpression, boost::optional coalitionStates) { + if(shieldingExpression->isPreSafetyShield()) { + PreSafetyShield shield(rowGroupIndices, choiceValues, shieldingExpression, coalitionStates); + return shield.construct(); + } else if(shieldingExpression->isPostSafetyShield()) { + STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Cannot create post safety shields yet"); + } else if(shieldingExpression->isOptimalShield()) { + STORM_LOG_THROW(false, storm::exceptions::InvalidArgumentException, "Cannot create optimal shields yet"); + } + } + } +}