#include "storm/builder/ExplicitModelBuilderResult.h" #include "storm/utility/macros.h" #include "storm/exceptions/InvalidOperationException.h" #include "storm/adapters/CarlAdapter.h" #include "storm/models/sparse/StandardRewardModel.h" namespace storm { namespace builder { template ExplicitModelBuilderResult::ExplicitModelBuilderResult(std::shared_ptr> model, std::shared_ptr stateValuations,std::shared_ptr choiceOrigins) : model(model), stateValuations(stateValuations), choiceOrigins(choiceOrigins) { // Intentionally left empty } template bool ExplicitModelBuilderResult::hasModel() { return static_cast(model); } template std::shared_ptr>& ExplicitModelBuilderResult::getModel() { STORM_LOG_THROW(model, storm::exceptions::InvalidOperationException, "Retrieving the model failed since it is not set."); return model; } template std::shared_ptr> const& ExplicitModelBuilderResult::getModel() const { STORM_LOG_THROW(model, storm::exceptions::InvalidOperationException, "Retrieving the model failed since it is not set."); return model; } template bool ExplicitModelBuilderResult::hasStateValuations() { return static_cast(stateValuations); } template std::shared_ptr& ExplicitModelBuilderResult::getStateValuations() { STORM_LOG_THROW(stateValuations, storm::exceptions::InvalidOperationException, "Retrieving the state valuations failed since they are not set."); return stateValuations; } template std::shared_ptr const& ExplicitModelBuilderResult::getStateValuations() const { STORM_LOG_THROW(stateValuations, storm::exceptions::InvalidOperationException, "Retrieving the state valuations failed since they are not set."); return stateValuations; } template bool ExplicitModelBuilderResult::hasChoiceOrigins() { return static_cast(choiceOrigins); } template std::shared_ptr& ExplicitModelBuilderResult::getChoiceOrigins() { STORM_LOG_THROW(choiceOrigins, storm::exceptions::InvalidOperationException, "Retrieving the choice origins failed since they are not set."); return choiceOrigins; } template std::shared_ptr const& ExplicitModelBuilderResult::getChoiceOrigins() const { STORM_LOG_THROW(choiceOrigins, storm::exceptions::InvalidOperationException, "Retrieving the choice origins failed since they are not set."); return choiceOrigins; } // Explicitly instantiate the class. template class ExplicitModelBuilderResult>; #ifdef STORM_HAVE_CARL template class ExplicitModelBuilderResult>; template class ExplicitModelBuilderResult>; template class ExplicitModelBuilderResult>; #endif } }