OpenLexocad  27.1
Solvable.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace Core
4 {
5 class LX_CORE_EXPORT Solvable
6 {
7 public:
8  virtual ~Solvable() {}
9 
10  // Is called before execute(). Can be overriden to solve the relationships of an object and update properties in dependent objects.
11  virtual void solve() = 0;
12 
13  void setIsSolvingEnabled(bool on);
14  bool isSolvingEnabled() const;
15 
16  bool mustBeSolved() const;
17  void setMustBeSolved(bool on);
18 
19 private:
20  bool _isSolvingEnabled = true;
21  bool _mustBeSolved = false;
22 };
23 
24 } // namespace Core
Definition: Solvable.h:5
virtual ~Solvable()
Definition: Solvable.h:8
Definition: Base.h:12