mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-20 09:17:23 +01:00
ensure that the evaluation corresponds to the right context) Change-Id: If9fcf4e3dfb01434008ad57c3d1a5f735b5779d3
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
#ifndef CALCULATION_CALCULATION_H
|
|
#define CALCULATION_CALCULATION_H
|
|
|
|
#include <poincare.h>
|
|
#include <escher.h>
|
|
|
|
namespace Calculation {
|
|
|
|
class Calculation {
|
|
public:
|
|
Calculation();
|
|
~Calculation(); // Delete expression and layout, if needed
|
|
Calculation& operator=(const Calculation& other);
|
|
Calculation(const Calculation& other) = delete;
|
|
Calculation(Calculation&& other) = delete;
|
|
Calculation& operator=(Calculation&& other) = delete;
|
|
/* c.reset() is the equivalent of c = Calculation() without copy assingment. */
|
|
void reset();
|
|
const char * inputText();
|
|
const char * outputText();
|
|
Poincare::Expression * input();
|
|
Poincare::ExpressionLayout * inputLayout();
|
|
Poincare::Expression * output(Poincare::Context * context);
|
|
Poincare::ExpressionLayout * outputLayout(Poincare::Context * context);
|
|
void setContent(const char * c, Poincare::Context * context);
|
|
bool isEmpty();
|
|
void tidy();
|
|
private:
|
|
char m_inputText[::TextField::maxBufferSize()];
|
|
char m_outputText[2*::TextField::maxBufferSize()];
|
|
Poincare::Expression * m_input;
|
|
Poincare::ExpressionLayout * m_inputLayout;
|
|
Poincare::Expression * m_output;
|
|
Poincare::ExpressionLayout * m_outputLayout;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|