From e561545e1a8996fbc63a676a67fe25d6bf32c964 Mon Sep 17 00:00:00 2001 From: Thomas Knoll Date: Mon, 7 Aug 2023 09:46:07 +0200 Subject: [PATCH] added second get shield --- .../results/ExplicitQuantitativeCheckResult.cpp | 8 +++++++- .../results/ExplicitQuantitativeCheckResult.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/storm/modelchecker/results/ExplicitQuantitativeCheckResult.cpp b/src/storm/modelchecker/results/ExplicitQuantitativeCheckResult.cpp index af654b505..b3c83efb6 100644 --- a/src/storm/modelchecker/results/ExplicitQuantitativeCheckResult.cpp +++ b/src/storm/modelchecker/results/ExplicitQuantitativeCheckResult.cpp @@ -234,7 +234,13 @@ namespace storm { template std::shared_ptr::IndexType>> const& ExplicitQuantitativeCheckResult::getShield() const { - STORM_LOG_THROW(this->hasScheduler(), storm::exceptions::InvalidOperationException, "Unable to retrieve non-existing scheduler."); + STORM_LOG_THROW(this->hasShield(), storm::exceptions::InvalidOperationException, "Unable to retrieve non-existing shield."); + return shield.get(); + } + + template + std::shared_ptr::IndexType>>& ExplicitQuantitativeCheckResult::getShield() { + STORM_LOG_THROW(this->hasShield(), storm::exceptions::InvalidOperationException, "Unable to retrieve non-existing shield."); return shield.get(); } diff --git a/src/storm/modelchecker/results/ExplicitQuantitativeCheckResult.h b/src/storm/modelchecker/results/ExplicitQuantitativeCheckResult.h index 5375a7902..d434e10b1 100644 --- a/src/storm/modelchecker/results/ExplicitQuantitativeCheckResult.h +++ b/src/storm/modelchecker/results/ExplicitQuantitativeCheckResult.h @@ -85,6 +85,7 @@ namespace storm { void setShield(std::unique_ptr> shield); std::shared_ptr> const& getShield() const; + std::shared_ptr>& getShield(); storm::json toJson(boost::optional const& stateValuations = boost::none) const;