Content


NTL
Core
IExpressionRunner

IExpressionRunner


Interface describes expression runner.

You can find more information in comments below. Overrided methods can be found in corresponding base class or interface.

class IExpressionRunner :public virtual IReleasable
{
protected:
    Variable m_sResult;
public:
    Variable &Result; // Variable storing result of expression execution 

    virtual IFunctionFactory *getFunctionFactory() = 0; // Return function factory 
    virtual size_t getVariableCount() const = 0; // Return variable count 
    virtual Variable *getVariable(const size_t index) = 0; // Return variable by index 
    virtual Variable *getVariable(const String &name) = 0; // Return variable by name 

    virtual bool setFunctionFactory(IFunctionFactory *factory) = 0; // Assign function factory 

    virtual bool AddVariable(const String &name, const Variable &variable) = 0; // Add variable 
    virtual bool DeleteVariable(const size_t index) = 0; // Delete variable by index 
    virtual bool DeleteVariable(const String &name) = 0; // Delete variable by name 
    virtual bool DeleteVariables() = 0; // Delete all variables 

    virtual bool Prepare(IExpression *expression) = 0; // Prepare expression 
    virtual bool Run() = 0; // Run previously successfully prepared expression 
};
Namespace: nitisa::script
Include: Nitisa/Modules/Script/Interfaces/IExpressionRunner.h