MicroModelicaCCompiler  4.5.3
MicroModelica::IR::DerivativePrinter Class Reference

#include <equation_printer.hpp>

Inheritance diagram for MicroModelica::IR::DerivativePrinter:
Collaboration diagram for MicroModelica::IR::DerivativePrinter:

Public Member Functions

 DerivativePrinter (Equation eq)
 
 ~DerivativePrinter ()=default
 
std::string print () const override
 
std::string macro () const override
 
void factorialInit (int fact_init)
 
- Public Member Functions inherited from MicroModelica::IR::EquationPrinter
 EquationPrinter (Equation eq)
 
virtual ~EquationPrinter ()=default
 
std::string identifier () const
 
std::string algCode () const
 
std::string prefix () const
 
std::string lhs (int order=0) const
 
virtual std::string equationId () const
 
FUNCTION_PRINTER::ReturnStatementType returnStm () const
 
std::multimap< std::string, int > usedVariables () const
 

Protected Member Functions

void initializeDerivatives ()
 
std::string generateDerivatives (std::string tabs, int init=1) const
 
- Protected Member Functions inherited from MicroModelica::IR::EquationPrinter
void setup (Equation eq)
 

Private Attributes

Expression _derivatives [3]
 
int _fact_init
 
int _id
 
Option< Range_range
 
Expression _lhs
 
Expression _rhs
 

Detailed Description

Definition at line 82 of file equation_printer.hpp.

Constructor & Destructor Documentation

◆ DerivativePrinter()

MicroModelica::IR::DerivativePrinter::DerivativePrinter ( Equation  eq)

Definition at line 164 of file equation_printer.cpp.

References _range, and TAB.

◆ ~DerivativePrinter()

MicroModelica::IR::DerivativePrinter::~DerivativePrinter ( )
default

Member Function Documentation

◆ factorialInit()

void MicroModelica::IR::DerivativePrinter::factorialInit ( int  fact_init)
inline

Definition at line 88 of file equation_printer.hpp.

◆ generateDerivatives()

string MicroModelica::IR::DerivativePrinter::generateDerivatives ( std::string  tabs,
int  init = 1 
) const
protected

Definition at line 208 of file equation_printer.cpp.

◆ initializeDerivatives()

void MicroModelica::IR::DerivativePrinter::initializeDerivatives ( )
protected

Definition at line 194 of file equation_printer.cpp.

References _derivatives, _fact_init, MicroModelica::IR::EquationPrinter::lhs(), and MicroModelica::IR::EquationPrinter::prefix().

Here is the call graph for this function:

◆ macro()

string MicroModelica::IR::DerivativePrinter::macro ( ) const
overridevirtual

Reimplemented from MicroModelica::IR::EquationPrinter.

Definition at line 170 of file equation_printer.cpp.

◆ print()

string MicroModelica::IR::DerivativePrinter::print ( ) const
overridevirtual

Member Data Documentation

◆ _derivatives

Expression MicroModelica::IR::DerivativePrinter::_derivatives[3]
private

Definition at line 95 of file equation_printer.hpp.

Referenced by initializeDerivatives().

◆ _fact_init

int MicroModelica::IR::DerivativePrinter::_fact_init
private

Definition at line 96 of file equation_printer.hpp.

Referenced by initializeDerivatives().

◆ _id

int MicroModelica::IR::DerivativePrinter::_id
private

Definition at line 97 of file equation_printer.hpp.

◆ _lhs

Expression MicroModelica::IR::DerivativePrinter::_lhs
private

Definition at line 99 of file equation_printer.hpp.

◆ _range

Option<Range> MicroModelica::IR::DerivativePrinter::_range
private

Definition at line 98 of file equation_printer.hpp.

Referenced by DerivativePrinter().

◆ _rhs

Expression MicroModelica::IR::DerivativePrinter::_rhs
private

Definition at line 100 of file equation_printer.hpp.


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