MicroModelicaCCompiler
4.5.3
|
#include <ginac_interface.hpp>
Public Member Functions | |
ConvertToGiNaC (Option< IR::Expression > exp) | |
GiNaC::ex | convert (AST_Expression, bool replaceDer=true, bool generateIndexes=false) |
GiNaC::symbol & | getSymbol (AST_Expression_ComponentReference) |
GiNaC::symbol & | getSymbol (string) |
GiNaC::symbol & | getSymbol (AST_Expression_Derivative) |
GiNaC::symbol & | getTime () |
GiNaC::symbol & | first () |
GiNaC::symbol & | next () |
bool | end () |
map< string, GiNaC::symbol > | directory () |
string | identifier (string str) |
![]() | |
AST_Expression_Visitor () | |
virtual | ~AST_Expression_Visitor ()=default |
GiNaC::ex | apply (AST_Expression e) |
Private Member Functions | |
GiNaC::ex | foldTraverseElement (AST_Expression) |
GiNaC::ex | foldTraverseElementUMinus (AST_Expression) |
GiNaC::ex | foldTraverseElement (GiNaC::ex, GiNaC::ex, BinOpType) |
GiNaC::ex | expressionVariable () |
Private Attributes | |
map< string, GiNaC::symbol > | _directory |
bool | _replaceDer |
bool | _generateIndexes |
Option< IR::Expression > | _exp |
Additional Inherited Members | |
![]() | |
AST_Expression | _left |
AST_Expression | _right |
bool | _in_bin_op |
Definition at line 76 of file ginac_interface.hpp.
MicroModelica::Util::ConvertToGiNaC::ConvertToGiNaC | ( | Option< IR::Expression > | exp | ) |
Definition at line 102 of file ginac_interface.cpp.
ex MicroModelica::Util::ConvertToGiNaC::convert | ( | AST_Expression | e, |
bool | replaceDer = true , |
||
bool | generateIndexes = false |
||
) |
Definition at line 104 of file ginac_interface.cpp.
References _generateIndexes, _replaceDer, and AST_Expression_Visitor< GiNaC::ex >::apply().
Referenced by foldTraverseElement(), and foldTraverseElementUMinus().
map< string, GiNaC::symbol > MicroModelica::Util::ConvertToGiNaC::directory | ( | ) |
Definition at line 122 of file ginac_interface.cpp.
References _directory.
bool MicroModelica::Util::ConvertToGiNaC::end | ( | ) |
Definition at line 120 of file ginac_interface.cpp.
Referenced by identifier().
|
private |
Definition at line 202 of file ginac_interface.cpp.
References _exp, getSymbol(), and getTime().
Referenced by foldTraverseElement().
GiNaC::symbol & MicroModelica::Util::ConvertToGiNaC::first | ( | ) |
Definition at line 116 of file ginac_interface.cpp.
Referenced by getTime().
|
privatevirtual |
Implements AST_Expression_Visitor< GiNaC::ex >.
Definition at line 212 of file ginac_interface.cpp.
References _generateIndexes, _replaceDer, AST_Expression_Visitor< GiNaC::ex >::apply(), AST_ListElement(), AST_ListFirst(), convert(), EXPCALL, EXPCOMPREF, EXPDERIVATIVE, EXPINTEGER, EXPOUTPUT, EXPREAL, expressionVariable(), getSymbol(), getTime(), MicroModelica::Util::Utils::instance(), MicroModelica::Util::ModelConfig::instance(), MicroModelica::Util::ModelConfig::lookup(), and toStr.
|
privatevirtual |
Implements AST_Expression_Visitor< GiNaC::ex >.
|
privatevirtual |
Implements AST_Expression_Visitor< GiNaC::ex >.
Definition at line 200 of file ginac_interface.cpp.
References _generateIndexes, _replaceDer, and convert().
symbol & MicroModelica::Util::ConvertToGiNaC::getSymbol | ( | AST_Expression_ComponentReference | cr | ) |
Definition at line 167 of file ginac_interface.cpp.
References _directory, and _generateIndexes.
Referenced by expressionVariable(), foldTraverseElement(), getSymbol(), and next().
symbol & MicroModelica::Util::ConvertToGiNaC::getSymbol | ( | AST_Expression_Derivative | der | ) |
Definition at line 157 of file ginac_interface.cpp.
References AST_Expression_ComponentReference_Add(), getSymbol(), newAST_Expression_ComponentReference(), newAST_ExpressionList(), and newAST_String().
symbol & MicroModelica::Util::ConvertToGiNaC::getSymbol | ( | string | cr | ) |
Definition at line 182 of file ginac_interface.cpp.
References _directory.
symbol & MicroModelica::Util::ConvertToGiNaC::getTime | ( | ) |
Definition at line 193 of file ginac_interface.cpp.
References _directory, and first().
Referenced by expressionVariable(), and foldTraverseElement().
string MicroModelica::Util::ConvertToGiNaC::identifier | ( | string | str | ) |
Definition at line 124 of file ginac_interface.cpp.
References end().
GiNaC::symbol & MicroModelica::Util::ConvertToGiNaC::next | ( | ) |
Definition at line 118 of file ginac_interface.cpp.
References getSymbol().
|
private |
Definition at line 112 of file ginac_interface.hpp.
Referenced by directory(), getSymbol(), and getTime().
|
private |
Definition at line 115 of file ginac_interface.hpp.
Referenced by expressionVariable().
|
private |
Definition at line 114 of file ginac_interface.hpp.
Referenced by convert(), foldTraverseElement(), foldTraverseElementUMinus(), and getSymbol().
|
private |
Definition at line 113 of file ginac_interface.hpp.
Referenced by convert(), foldTraverseElement(), and foldTraverseElementUMinus().