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