CCalculator


This module has been removed in release 14.0.0. Use Script module instead.

Default calculator implementation. It is used for calculating expressions.

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

class CCalculator :public virtual ICalculator
    {
    public:
        int getErrorCount() override;
        ERROR_INFO getError(const int index) override;
        int getProcedureCount() const override;
        IProcedure *getProcedure(const int index) override;
        IProcedure *getProcedure(const String &name) override;
        int getVariableCount() const override;
        CVariable *getVariable(const int index) override;
        CVariable *getVariable(const String &name) override;
        IEntityCalculator *getEntityCalculator() override;
    
        bool setEntityCalculator(IEntityCalculator *value) override;
    
        bool AddProcedure(IProcedure *proc) override;
        bool DeleteProcedure(const int index) override;
        bool DeleteProcedure(IProcedure *proc) override;
        bool DeleteProcedure(const String &name) override;
        bool ClearProcedures() override;
    
        bool AddVariable(CVariable *value) override;
        CVariable *AddVariable(const String &name) override;
        CVariable *AddVariable(const String &name, const String &value) override;
        CVariable *AddVariable(const String &name, const long long value) override;
        CVariable *AddVariable(const String &name, const double value) override;
        void SetVariable(const String &name, const String &value) override;
        void SetVariable(const String &name, const long long value) override;
        void SetVariable(const String &name, const double value) override;
        bool DeleteVariable(const int index) override;
        bool DeleteVariable(CVariable *item) override;
        bool DeleteVariable(const String &name) override;
        bool ClearVariables() override;
    
        void ClearErrors() override;
        CVariable *Calculate(CExpression *expression, CVariable *parent) override;
        void Release() override;
    
        CCalculator();
        virtual ~CCalculator();
    };
Namespace: nitisa::scripting
Include: Nitisa/Modules/Scripting/Calculator.h