Also enfore C++ "rule-of-three".
/** Basic MC guiding class which corresponds to no guide at all (random choice) */
class BasicStrategy : public Strategy {
public:
- void operator=(const BasicStrategy&)
+ BasicStrategy() = default;
+ ~BasicStrategy() = default;
+ BasicStrategy(const BasicStrategy&) = delete;
+ BasicStrategy& operator=(const BasicStrategy&)
{ /* nothing to copy over while cloning */
- return;
+ return *this;
}
std::pair<aid_t, int> next_transition() const override
std::map<aid_t, ActorState> actors_to_run_;
public:
- virtual ~Strategy() = default;
- void operator=(const Strategy&)
+ Strategy() = default;
+ virtual ~Strategy() = default;
+ Strategy(const Strategy&) = delete;
+ Strategy& operator=(const Strategy&)
{ /* nothing to copy over while cloning */
- return;
+ return *this;
}
virtual std::pair<aid_t, int> next_transition() const = 0;
bool taking_wait_ = false;
public:
- void operator=(const WaitStrategy& guide) { taken_wait_ = guide.taken_wait_; }
+ WaitStrategy() = default;
+ ~WaitStrategy() = default;
+ WaitStrategy(const BasicStrategy&) = delete;
+ WaitStrategy& operator=(const WaitStrategy& guide)
+ {
+ taken_wait_ = guide.taken_wait_;
+ return *this;
+ }
bool is_transition_wait(Transition::Type type) const
{