Dune::Copasi
|
#include <parser.hh>
Public Types | |
using | RangeField = double |
using | Function0D = fu2::unique_function<RangeField() const> |
using | Function1D = fu2::unique_function<RangeField(RangeField) const> |
using | Function2D = fu2::unique_function<RangeField(RangeField, RangeField) const> |
using | Function3D = fu2::unique_function<RangeField(RangeField, RangeField, RangeField) const> |
using | Function4D = fu2::unique_function<RangeField(RangeField, RangeField, RangeField, RangeField) const> |
Public Member Functions | |
Parser ()=default | |
Parser (const Parser &)=delete | |
Parser (Parser &&)=default | |
Parser & | operator= (const Parser &)=delete |
Parser & | operator= (Parser &&)=default |
virtual | ~Parser ()=default |
virtual void | set_expression (const std::string &expression) |
std::string | expression () const |
virtual void | define_variable (const std::string &symbol, RangeField const *value) |
virtual void | define_constant (const std::string &symbol, const RangeField &value)=0 |
virtual void | define_function (const std::string &symbol, Function0D &&function)=0 |
virtual void | define_function (const std::string &symbol, Function1D &&function)=0 |
virtual void | define_function (const std::string &symbol, Function2D &&function)=0 |
virtual void | define_function (const std::string &symbol, Function3D &&function)=0 |
virtual void | define_function (const std::string &symbol, Function4D &&function)=0 |
bool | compiled () const |
virtual void | compile ()=0 |
virtual RangeField | operator() () const noexcept=0 |
Protected Attributes | |
bool | _compiled = false |
std::string | _expression |
std::vector< std::string > | _symbols |
std::vector< RangeField const * > | _variables |
using Dune::Copasi::Parser::Function0D = fu2::unique_function<RangeField() const> |
using Dune::Copasi::Parser::Function1D = fu2::unique_function<RangeField(RangeField) const> |
using Dune::Copasi::Parser::Function2D = fu2::unique_function<RangeField(RangeField, RangeField) const> |
using Dune::Copasi::Parser::Function3D = fu2::unique_function<RangeField(RangeField, RangeField, RangeField) const> |
using Dune::Copasi::Parser::Function4D = fu2::unique_function<RangeField(RangeField, RangeField, RangeField, RangeField) const> |
|
default |
|
default |
|
virtualdefault |
Implemented in Dune::Copasi::MuParser, Dune::Copasi::ExprTkParser, and Dune::Copasi::SymEngineParser.
bool Dune::Copasi::Parser::compiled | ( | ) | const |
|
pure virtual |
Implemented in Dune::Copasi::MuParser, Dune::Copasi::ExprTkParser, and Dune::Copasi::SymEngineParser.
|
pure virtual |
Implemented in Dune::Copasi::MuParser, Dune::Copasi::ExprTkParser, and Dune::Copasi::SymEngineParser.
|
pure virtual |
Implemented in Dune::Copasi::MuParser, Dune::Copasi::ExprTkParser, and Dune::Copasi::SymEngineParser.
|
pure virtual |
Implemented in Dune::Copasi::MuParser, Dune::Copasi::ExprTkParser, and Dune::Copasi::SymEngineParser.
|
pure virtual |
Implemented in Dune::Copasi::MuParser, Dune::Copasi::ExprTkParser, and Dune::Copasi::SymEngineParser.
|
pure virtual |
Implemented in Dune::Copasi::MuParser, Dune::Copasi::ExprTkParser, and Dune::Copasi::SymEngineParser.
|
virtual |
std::string Dune::Copasi::Parser::expression | ( | ) | const |
|
pure virtualnoexcept |
Implemented in Dune::Copasi::MuParser, Dune::Copasi::ExprTkParser, and Dune::Copasi::SymEngineParser.
Reimplemented in Dune::Copasi::SymEngineParser.
|
protected |
|
protected |
|
protected |