MicroModelicaCCompiler  4.5.3
MicroModelica::Generator::Function Class Reference

#include <function.hpp>

Collaboration diagram for MicroModelica::Generator::Function:

Public Member Functions

 Function (IR::Function &function, Util::CompileFlags &flags, WriterPtr writer)
 
 ~Function ()
 
void definition ()
 
std::string header ()
 
void setPrefix (std::string prefix)
 
void addInclude (std::string include)
 
void addInclude (Util::SymbolTable includes)
 

Private Member Functions

void includes ()
 
void body ()
 
void localSymbols ()
 
std::string prototype ()
 

Private Attributes

IR::Function _function
 
Util::CompileFlags _flags
 
WriterPtr _writer
 
std::string _prefix
 
Util::SymbolTable _include
 
std::string _return_variable
 
Util::VarSymbolTable _symbols
 
bool _void_function
 

Detailed Description

Definition at line 65 of file function.hpp.

Constructor & Destructor Documentation

◆ Function()

MicroModelica::Generator::Function::Function ( IR::Function function,
Util::CompileFlags flags,
WriterPtr  writer 
)

Definition at line 47 of file function.cpp.

References body(), and includes().

Here is the call graph for this function:

◆ ~Function()

Member Function Documentation

◆ addInclude() [1/2]

void MicroModelica::Generator::Function::addInclude ( std::string  include)

Referenced by ~Function().

◆ addInclude() [2/2]

void MicroModelica::Generator::Function::addInclude ( Util::SymbolTable  includes)

Definition at line 187 of file function.cpp.

◆ body()

void MicroModelica::Generator::Function::body ( )
private

Definition at line 133 of file function.cpp.

References _return_variable, _writer, and MicroModelica::Generator::WRITER::Function_Code.

Referenced by Function().

◆ definition()

void MicroModelica::Generator::Function::definition ( )

Definition at line 63 of file function.cpp.

◆ header()

string MicroModelica::Generator::Function::header ( )

Definition at line 131 of file function.cpp.

◆ includes()

void MicroModelica::Generator::Function::includes ( )
private

Definition at line 69 of file function.cpp.

Referenced by Function().

◆ localSymbols()

void MicroModelica::Generator::Function::localSymbols ( )
private

Definition at line 158 of file function.cpp.

◆ prototype()

string MicroModelica::Generator::Function::prototype ( )
private

Definition at line 90 of file function.cpp.

◆ setPrefix()

void MicroModelica::Generator::Function::setPrefix ( std::string  prefix)

Definition at line 183 of file function.cpp.

Member Data Documentation

◆ _flags

Util::CompileFlags MicroModelica::Generator::Function::_flags
private

Definition at line 98 of file function.hpp.

◆ _function

IR::Function MicroModelica::Generator::Function::_function
private

Definition at line 97 of file function.hpp.

◆ _include

Util::SymbolTable MicroModelica::Generator::Function::_include
private

Definition at line 101 of file function.hpp.

Referenced by ~Function().

◆ _prefix

std::string MicroModelica::Generator::Function::_prefix
private

Definition at line 100 of file function.hpp.

◆ _return_variable

std::string MicroModelica::Generator::Function::_return_variable
private

Definition at line 102 of file function.hpp.

Referenced by body().

◆ _symbols

Util::VarSymbolTable MicroModelica::Generator::Function::_symbols
private

Definition at line 103 of file function.hpp.

◆ _void_function

bool MicroModelica::Generator::Function::_void_function
private

Definition at line 104 of file function.hpp.

◆ _writer

WriterPtr MicroModelica::Generator::Function::_writer
private

Definition at line 99 of file function.hpp.

Referenced by body(), and ~Function().


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