IterationFormula.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef MANDEL_ITERATIONFORMULA_H
  2. #define MANDEL_ITERATIONFORMULA_H
  3. namespace mnd
  4. {
  5. struct IterationFormula;
  6. struct Expression;
  7. struct Constant;
  8. struct Variable;
  9. struct UnaryOperation;
  10. struct BinaryOperation;
  11. struct Addition;
  12. struct Multiplication;
  13. struct Division;
  14. struct Pow;
  15. }
  16. struct mnd::IterationFormula
  17. {
  18. std::unique_ptr<Expression> expr;
  19. };
  20. struct mnd::Expression
  21. {
  22. };
  23. struct mnd::Constant : mnd::Expression
  24. {
  25. double value;
  26. };
  27. struct mnd::Variable : mnd::Expression
  28. {
  29. std::string name;
  30. };
  31. struct mnd::UnaryOperation : mnd::Expression
  32. {
  33. std::unique_ptr<Expression> operand;
  34. };
  35. struct mnd::BinaryOperation : mnd::Expression
  36. {
  37. std::unique_ptr<Expression> left;
  38. std::unique_ptr<Expression> right;
  39. };
  40. struct mnd::Addition : mnd::BinaryOperation
  41. {
  42. bool subtraction = false;
  43. };
  44. struct mnd::Multiplication : mnd::BinaryOperation
  45. {
  46. };
  47. struct mnd::Division : mnd::BinaryOperation
  48. {
  49. };
  50. struct mnd::Pow : mnd::BinaryOperation
  51. {
  52. };
  53. #endif // MANDEL_ITERATIONFORMULA_H