From df52e5af88bd4d3da135b9d9507074fc48843f37 Mon Sep 17 00:00:00 2001 From: Stefan Pranger Date: Thu, 19 Nov 2020 18:26:42 +0100 Subject: [PATCH] added casting getter for gameFormula --- src/storm/logic/Formula.cpp | 8 ++++++++ src/storm/logic/Formula.h | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/storm/logic/Formula.cpp b/src/storm/logic/Formula.cpp index 0a310713d..d8b399e34 100644 --- a/src/storm/logic/Formula.cpp +++ b/src/storm/logic/Formula.cpp @@ -333,6 +333,14 @@ namespace storm { return dynamic_cast(*this); } + GameFormula& Formula::asGameFormula() { + return dynamic_cast(*this); + } + + GameFormula const& Formula::asGameFormula() const { + return dynamic_cast(*this); + } + GloballyFormula& Formula::asGloballyFormula() { return dynamic_cast(*this); } diff --git a/src/storm/logic/Formula.h b/src/storm/logic/Formula.h index 8fabb4fe0..294637c2e 100644 --- a/src/storm/logic/Formula.h +++ b/src/storm/logic/Formula.h @@ -154,7 +154,10 @@ namespace storm { EventuallyFormula& asReachabilityTimeFormula(); EventuallyFormula const& asReachabilityTimeFormula() const; - + + GameFormula& asGameFormula(); + GameFormula const& asGameFormula() const; + GloballyFormula& asGloballyFormula(); GloballyFormula const& asGloballyFormula() const;