ModuleMath.h 582 B

1234567891011121314151617181920212223242526272829
  1. #ifndef MDD_MODULEMATH_H
  2. #define MDD_MODULEMATH_H
  3. #include "ModuleBase.h"
  4. namespace mdd {
  5. enum MathOperation {
  6. ADD = 1,
  7. SUBSTRACT = 2,
  8. MULTIPLIKATION = 3,
  9. DIVISION = 4
  10. };
  11. class ModuleMath : public ModuleBase {
  12. private:
  13. MathOperation _operation;
  14. json&& add(const json &val1, const json &val2);
  15. public:
  16. explicit ModuleMath(MathOperation operation = ADD);
  17. void update() override;
  18. void setMathOperation(MathOperation operation);
  19. MathOperation getMathOperation();
  20. };
  21. }
  22. #endif