36 lines
719 B
C++
36 lines
719 B
C++
#include "Archimedes.h"
|
|
|
|
class Calculator : public Archimedes::Module {
|
|
|
|
public:
|
|
Calculator(Archimedes::App*, void*);
|
|
|
|
Calculator() { name = "Calculator"; }
|
|
|
|
~Calculator();
|
|
|
|
void onLoad();
|
|
|
|
void run();
|
|
private:
|
|
bool open = true;
|
|
|
|
bool parenthesis = true;
|
|
|
|
bool graphing = false;
|
|
|
|
void basicCalculator();
|
|
|
|
std::string calculate(std::string);
|
|
double evaluate(std::string, std::unordered_map<char, std::string>&);
|
|
void index(std::string, std::unordered_map<unsigned int, std::string>&);
|
|
|
|
void graphingCalculator();
|
|
|
|
};
|
|
|
|
#ifdef CALCULATOR_DYNAMIC
|
|
typedef Calculator mtype;
|
|
#include "endModule.h"
|
|
#endif
|