| 28 | } |
| 29 | |
| 30 | virtual Function *generate(EngineContext *context) { |
| 31 | Function *existingFunction = context->getFunction(this); |
| 32 | if (existingFunction != nullptr) { |
| 33 | return existingFunction; |
| 34 | } |
| 35 | else { |
| 36 | Function *function = new Function; |
| 37 | function->initialize((int)m_samples.size(), m_filterRadius); |
| 38 | |
| 39 | for (const Sample &sample : m_samples) { |
| 40 | function->addSample(sample.x, sample.y); |
| 41 | } |
| 42 | |
| 43 | context->addFunction(this, function); |
| 44 | return function; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | protected: |
| 49 | virtual void registerInputs() { |
nothing calls this directly
no test coverage detected