Dune::Copasi
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
Dune::Copasi::Parser Class Referenceabstract

#include <parser.hh>

Inheritance diagram for Dune::Copasi::Parser:
Inheritance graph
[legend]

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
 
Parseroperator= (const Parser &)=delete
 
Parseroperator= (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
 

Member Typedef Documentation

◆ Function0D

◆ Function1D

◆ Function2D

◆ Function3D

◆ Function4D

◆ RangeField

Constructor & Destructor Documentation

◆ Parser() [1/3]

Dune::Copasi::Parser::Parser ( )
default

◆ Parser() [2/3]

Dune::Copasi::Parser::Parser ( const Parser & )
delete

◆ Parser() [3/3]

Dune::Copasi::Parser::Parser ( Parser && )
default

◆ ~Parser()

virtual Dune::Copasi::Parser::~Parser ( )
virtualdefault

Member Function Documentation

◆ compile()

virtual void Dune::Copasi::Parser::compile ( )
pure virtual

◆ compiled()

bool Dune::Copasi::Parser::compiled ( ) const

◆ define_constant()

virtual void Dune::Copasi::Parser::define_constant ( const std::string & symbol,
const RangeField & value )
pure virtual

◆ define_function() [1/5]

virtual void Dune::Copasi::Parser::define_function ( const std::string & symbol,
Function0D && function )
pure virtual

◆ define_function() [2/5]

virtual void Dune::Copasi::Parser::define_function ( const std::string & symbol,
Function1D && function )
pure virtual

◆ define_function() [3/5]

virtual void Dune::Copasi::Parser::define_function ( const std::string & symbol,
Function2D && function )
pure virtual

◆ define_function() [4/5]

virtual void Dune::Copasi::Parser::define_function ( const std::string & symbol,
Function3D && function )
pure virtual

◆ define_function() [5/5]

virtual void Dune::Copasi::Parser::define_function ( const std::string & symbol,
Function4D && function )
pure virtual

◆ define_variable()

virtual void Dune::Copasi::Parser::define_variable ( const std::string & symbol,
RangeField const * value )
virtual

◆ expression()

std::string Dune::Copasi::Parser::expression ( ) const

◆ operator()()

virtual RangeField Dune::Copasi::Parser::operator() ( ) const
pure virtualnoexcept

◆ operator=() [1/2]

Parser & Dune::Copasi::Parser::operator= ( const Parser & )
delete

◆ operator=() [2/2]

Parser & Dune::Copasi::Parser::operator= ( Parser && )
default

◆ set_expression()

virtual void Dune::Copasi::Parser::set_expression ( const std::string & expression)
virtual

Reimplemented in Dune::Copasi::SymEngineParser.

Member Data Documentation

◆ _compiled

bool Dune::Copasi::Parser::_compiled = false
protected

◆ _expression

std::string Dune::Copasi::Parser::_expression
protected

◆ _symbols

std::vector<std::string> Dune::Copasi::Parser::_symbols
protected

◆ _variables

std::vector<RangeField const*> Dune::Copasi::Parser::_variables
protected

The documentation for this class was generated from the following file: