1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2025-12-23 01:04:29 +00:00

Compiled function: access to source code

This commit is contained in:
2014-09-29 15:10:38 +01:00
parent bbeaec9ed3
commit bf3fe8bd13
4 changed files with 19 additions and 3 deletions

View File

@@ -38,7 +38,8 @@ public:
// destructor
virtual ~CompiledDoubleFunction(void) = default;
// access
void setCode(const std::string &code);
std::string getCode(void);
void setCode(const std::string &code);
// function call
using DoubleFunction::operator();
virtual double operator()(const double *arg) const;
@@ -49,6 +50,7 @@ private:
// compile
void compile(void) const;
private:
std::string code_;
std::shared_ptr<MathInterpreter> interpreter_;
std::shared_ptr<RunContext> context_;
std::shared_ptr<std::vector<unsigned int>> varAddress_;