MicroModelicaCCompiler  4.5.3
MicroModelica::Generator::Macros Class Reference

#include <macros.hpp>

Collaboration diagram for MicroModelica::Generator::Macros:

Public Member Functions

 Macros (IR::Model &model, Util::Variable &variable)
 
 Macros ()
 
 ~Macros ()=default
 
std::string print () const
 
std::string parameters (MACROS::Offset offset=MACROS::Modelica) const
 
std::string engineIndex () const
 
std::string engineIndexArguments () const
 
std::string arguments (bool state=true) const
 
std::string usage (std::string token, Option< IR::Range > range, int id) const
 
std::string indexMacro (std::string token, Option< IR::Range > range, int id) const
 
std::string modelAccess (int discretes, int algebraics)
 
std::string coeffMultipliers (int order)
 

Protected Member Functions

void initialize ()
 

Private Attributes

IR::Model _model
 
Util::Variable _variable
 
bool _is_qss
 
std::stringstream _macros
 

Friends

std::ostream & operator<< (std::ostream &out, const Macros &m)
 

Detailed Description

Definition at line 71 of file macros.hpp.

Constructor & Destructor Documentation

◆ Macros() [1/2]

MicroModelica::Generator::Macros::Macros ( IR::Model model,
Util::Variable variable 
)

◆ Macros() [2/2]

MicroModelica::Generator::Macros::Macros ( )
inline

Definition at line 74 of file macros.hpp.

◆ ~Macros()

MicroModelica::Generator::Macros::~Macros ( )
default

Member Function Documentation

◆ arguments()

◆ coeffMultipliers()

string MicroModelica::Generator::Macros::coeffMultipliers ( int  order)

Definition at line 255 of file macros.cpp.

Referenced by MicroModelica::Generator::ModelInstance::configEvents().

◆ engineIndex()

string MicroModelica::Generator::Macros::engineIndex ( ) const

Definition at line 111 of file macros.cpp.

References _variable, and MicroModelica::Util::Variable::dimensions().

Here is the call graph for this function:

◆ engineIndexArguments()

string MicroModelica::Generator::Macros::engineIndexArguments ( ) const

Definition at line 90 of file macros.cpp.

References _variable, arguments(), MicroModelica::Util::Variable::dimensions(), MicroModelica::Util::Variable::offset(), and MicroModelica::Util::Variable::rowSize().

Referenced by initialize().

Here is the call graph for this function:

◆ indexMacro()

string MicroModelica::Generator::Macros::indexMacro ( std::string  token,
Option< IR::Range range,
int  id 
) const

◆ initialize()

◆ modelAccess()

string MicroModelica::Generator::Macros::modelAccess ( int  discretes,
int  algebraics 
)

Definition at line 234 of file macros.cpp.

◆ parameters()

string MicroModelica::Generator::Macros::parameters ( MACROS::Offset  offset = MACROS::Modelica) const

Definition at line 39 of file macros.cpp.

References _is_qss, _variable, MicroModelica::Util::Variable::dimensions(), and MicroModelica::Generator::MACROS::Engine.

Referenced by MicroModelica::Generator::QSSModelInstance::generate(), and initialize().

Here is the call graph for this function:

◆ print()

std::string MicroModelica::Generator::Macros::print ( ) const

Definition at line 287 of file macros.cpp.

References _macros.

Referenced by MicroModelica::Generator::operator<<().

◆ usage()

string MicroModelica::Generator::Macros::usage ( std::string  token,
Option< IR::Range range,
int  id 
) const

Definition at line 198 of file macros.cpp.

Referenced by MicroModelica::IR::FunctionPrinter::jacMacrosAccess().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Macros m 
)
friend

Definition at line 289 of file macros.cpp.

Member Data Documentation

◆ _is_qss

bool MicroModelica::Generator::Macros::_is_qss
private

Definition at line 93 of file macros.hpp.

Referenced by arguments(), initialize(), Macros(), and parameters().

◆ _macros

std::stringstream MicroModelica::Generator::Macros::_macros
private

Definition at line 94 of file macros.hpp.

Referenced by initialize(), and print().

◆ _model

IR::Model MicroModelica::Generator::Macros::_model
private

Definition at line 91 of file macros.hpp.

Referenced by arguments(), and Macros().

◆ _variable

Util::Variable MicroModelica::Generator::Macros::_variable
private

Definition at line 92 of file macros.hpp.

Referenced by arguments(), engineIndex(), engineIndexArguments(), initialize(), Macros(), and parameters().


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