KSGSExpressionEvaluator.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #include "../Include/KSGScript.h"
  3. #include "../Befehl/KSGSFunktion.h"
  4. namespace KSGScript
  5. {
  6. class KSGSKlasse;
  7. class KSGSVariable;
  8. class KSGSFunktion;
  9. class KSGSExpressionEvaluatorImpl : public KSGSExpressionEvaluator
  10. {
  11. private:
  12. Framework::RCArray<KSGSVariable>* params;
  13. Framework::RCArray<Text>* paramNames;
  14. Framework::Text expression;
  15. RCArray< KSGSFunktion >* functions;
  16. RCArray< KSGSKlasse >* classes;
  17. RCArray< KSGSVariable >* variables;
  18. private:
  19. void compile();
  20. public:
  21. KSGSExpressionEvaluatorImpl();
  22. ~KSGSExpressionEvaluatorImpl();
  23. KSGSVariable* createParameter(Framework::Text name, int type) override;
  24. KSGSVariable* getParameter(Framework::Text name) override;
  25. void setExpression(Framework::Text expression) override;
  26. KSGSVariable* evaluate() override;
  27. void logNachricht(const char* n) override;
  28. Framework::Text* convertPfad(const char* pf) override;
  29. void setVariable(int id, KSGSVariable* var) override;
  30. KSGSVariable* startFunktion(int id, Framework::RCArray< KSGSVariable >* parameter) override;
  31. KSGSVariable* erstellKlassenInstanz(int id) override;
  32. KSGSVariable* getVariable(int id) const override;
  33. int getScriptId() const override;
  34. Framework::Bildschirm* zBildschirm() const override;
  35. Framework::Schrift* zSchrift() const override;
  36. int getFunktionId(const char* name) const override;
  37. bool istBeendet(int scrId) const override;
  38. KSGSVariable* callback(Framework::RCArray< KSGSVariable >* parameter) const override;
  39. };
  40. }