From 88c62d20bff19dc176002befe72ab95132ef2aa3 Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Fri, 26 Jul 2019 08:37:39 +0200 Subject: [PATCH] SchedulerClass: setter return a reference to *this --- src/storm/storage/SchedulerClass.cpp | 6 ++++-- src/storm/storage/SchedulerClass.h | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/storm/storage/SchedulerClass.cpp b/src/storm/storage/SchedulerClass.cpp index e894f9553..c541e995b 100644 --- a/src/storm/storage/SchedulerClass.cpp +++ b/src/storm/storage/SchedulerClass.cpp @@ -45,13 +45,15 @@ namespace storm { return *this; } - void SchedulerClass::setMemoryPattern(MemoryPattern const& pattern) { + SchedulerClass& SchedulerClass::setMemoryPattern(MemoryPattern const& pattern) { memoryPattern = pattern; + return *this; } - void SchedulerClass::setPositional() { + SchedulerClass& SchedulerClass::setPositional() { setMemoryPattern(MemoryPattern::Arbitrary); setMemoryStates(1); + return *this; } } diff --git a/src/storm/storage/SchedulerClass.h b/src/storm/storage/SchedulerClass.h index 2a0b92c07..caaf3c968 100644 --- a/src/storm/storage/SchedulerClass.h +++ b/src/storm/storage/SchedulerClass.h @@ -1,3 +1,4 @@ + #pragma once #include @@ -20,11 +21,11 @@ namespace storm { MemoryPattern getMemoryPattern() const; bool isPositional() const; - SchedulerClass& setIsDeterministic(bool value); + SchedulerClass& setIsDeterministic(bool value = true); SchedulerClass& setMemoryStates(uint64_t value); SchedulerClass& unsetMemoryStates(); - void setMemoryPattern(MemoryPattern const& pattern); - void setPositional(); + SchedulerClass& setMemoryPattern(MemoryPattern const& pattern); + SchedulerClass& setPositional(); private: bool deterministic;