MicroModelicaCCompiler  4.5.3
MicroModelica::Util::ConvertToGiNaC Class Reference

#include <ginac_interface.hpp>

Inheritance diagram for MicroModelica::Util::ConvertToGiNaC:
Collaboration diagram for MicroModelica::Util::ConvertToGiNaC:

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)
 
- Public Member Functions inherited from AST_Expression_Visitor< GiNaC::ex >
 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

- Protected Attributes inherited from AST_Expression_Visitor< GiNaC::ex >
AST_Expression _left
 
AST_Expression _right
 
bool _in_bin_op
 

Detailed Description

Definition at line 76 of file ginac_interface.hpp.

Constructor & Destructor Documentation

◆ ConvertToGiNaC()

MicroModelica::Util::ConvertToGiNaC::ConvertToGiNaC ( Option< IR::Expression exp)

Definition at line 102 of file ginac_interface.cpp.

Member Function Documentation

◆ convert()

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().

Here is the call graph for this function:

◆ directory()

map< string, GiNaC::symbol > MicroModelica::Util::ConvertToGiNaC::directory ( )

Definition at line 122 of file ginac_interface.cpp.

References _directory.

◆ end()

bool MicroModelica::Util::ConvertToGiNaC::end ( )

Definition at line 120 of file ginac_interface.cpp.

Referenced by identifier().

◆ expressionVariable()

ex MicroModelica::Util::ConvertToGiNaC::expressionVariable ( )
private

Definition at line 202 of file ginac_interface.cpp.

References _exp, getSymbol(), and getTime().

Referenced by foldTraverseElement().

Here is the call graph for this function:

◆ first()

GiNaC::symbol & MicroModelica::Util::ConvertToGiNaC::first ( )

Definition at line 116 of file ginac_interface.cpp.

Referenced by getTime().

◆ foldTraverseElement() [1/2]

◆ foldTraverseElement() [2/2]

GiNaC::ex MicroModelica::Util::ConvertToGiNaC::foldTraverseElement ( GiNaC::ex  ,
GiNaC::ex  ,
BinOpType   
)
privatevirtual

◆ foldTraverseElementUMinus()

ex MicroModelica::Util::ConvertToGiNaC::foldTraverseElementUMinus ( AST_Expression  e)
privatevirtual

Implements AST_Expression_Visitor< GiNaC::ex >.

Definition at line 200 of file ginac_interface.cpp.

References _generateIndexes, _replaceDer, and convert().

Here is the call graph for this function:

◆ getSymbol() [1/3]

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().

◆ getSymbol() [2/3]

symbol & MicroModelica::Util::ConvertToGiNaC::getSymbol ( AST_Expression_Derivative  der)

◆ getSymbol() [3/3]

symbol & MicroModelica::Util::ConvertToGiNaC::getSymbol ( string  cr)

Definition at line 182 of file ginac_interface.cpp.

References _directory.

◆ getTime()

symbol & MicroModelica::Util::ConvertToGiNaC::getTime ( )

Definition at line 193 of file ginac_interface.cpp.

References _directory, and first().

Referenced by expressionVariable(), and foldTraverseElement().

Here is the call graph for this function:

◆ identifier()

string MicroModelica::Util::ConvertToGiNaC::identifier ( string  str)

Definition at line 124 of file ginac_interface.cpp.

References end().

Here is the call graph for this function:

◆ next()

GiNaC::symbol & MicroModelica::Util::ConvertToGiNaC::next ( )

Definition at line 118 of file ginac_interface.cpp.

References getSymbol().

Here is the call graph for this function:

Member Data Documentation

◆ _directory

map<string, GiNaC::symbol> MicroModelica::Util::ConvertToGiNaC::_directory
private

Definition at line 112 of file ginac_interface.hpp.

Referenced by directory(), getSymbol(), and getTime().

◆ _exp

Option<IR::Expression> MicroModelica::Util::ConvertToGiNaC::_exp
private

Definition at line 115 of file ginac_interface.hpp.

Referenced by expressionVariable().

◆ _generateIndexes

bool MicroModelica::Util::ConvertToGiNaC::_generateIndexes
private

◆ _replaceDer

bool MicroModelica::Util::ConvertToGiNaC::_replaceDer
private

Definition at line 113 of file ginac_interface.hpp.

Referenced by convert(), foldTraverseElement(), and foldTraverseElementUMinus().


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