MicroModelicaCCompiler  4.5.3
MicroModelica::IR::Statement Class Reference

#include <statement.hpp>

Collaboration diagram for MicroModelica::IR::Statement:

Public Member Functions

 Statement (AST_Statement stm, bool initial=false, const std::string &block="")
 
 Statement (AST_Statement stm, Option< Range > range, bool initial=false, const std::string &block="")
 
 Statement ()
 
 ~Statement ()=default
 
bool hasRange ()
 
Util::SymbolTable calledFunctions ()
 
string print () const
 
ExpressionList assignments (STATEMENT::AssignTerm asg) const
 Returns a expression list containing all the expressions needed by the graph builders. Without the if/for/when sentences. More...
 
ExpressionList lhsDiscretes () const
 
ExpressionList lhsStates () const
 
bool isAssignment () const
 
bool isForStatement () const
 
Option< Rangerange ()
 
bool autonomous () const
 

Protected Member Functions

void initialize ()
 
ExpressionList generateExps (STATEMENT::AssignTerm asg)
 
Expression emptyRef ()
 
bool checkStateAssignment (Expression exp) const
 
std::string printAssignment (AST_Statement_Assign asg) const
 
void setRange ()
 

Private Attributes

AST_Statement _stm
 
Option< Range_range
 
Util::SymbolTable _calledFunctions
 
std::string _block
 
ExpressionList _lhs_assignments
 
ExpressionList _rhs_assignments
 
ExpressionList _lhs_discretes
 
ExpressionList _lhs_states
 

Friends

std::ostream & operator<< (std::ostream &out, const Statement &s)
 

Detailed Description

Definition at line 54 of file statement.hpp.

Constructor & Destructor Documentation

◆ Statement() [1/3]

MicroModelica::IR::Statement::Statement ( AST_Statement  stm,
bool  initial = false,
const std::string &  block = "" 
)

◆ Statement() [2/3]

MicroModelica::IR::Statement::Statement ( AST_Statement  stm,
Option< Range range,
bool  initial = false,
const std::string &  block = "" 
)

◆ Statement() [3/3]

MicroModelica::IR::Statement::Statement ( )
inline

Definition at line 58 of file statement.hpp.

◆ ~Statement()

MicroModelica::IR::Statement::~Statement ( )
default

Member Function Documentation

◆ assignments()

ExpressionList MicroModelica::IR::Statement::assignments ( STATEMENT::AssignTerm  asg) const

Returns a expression list containing all the expressions needed by the graph builders. Without the if/for/when sentences.

Returns
Expression list used by the graph builders.
See also
{dh_graph_builder.cpp}

Definition at line 274 of file statement.cpp.

◆ autonomous()

bool MicroModelica::IR::Statement::autonomous ( ) const

Definition at line 288 of file statement.cpp.

◆ calledFunctions()

Util::SymbolTable MicroModelica::IR::Statement::calledFunctions ( )
inline

Definition at line 62 of file statement.hpp.

◆ checkStateAssignment()

bool MicroModelica::IR::Statement::checkStateAssignment ( Expression  exp) const
protected

Definition at line 163 of file statement.cpp.

◆ emptyRef()

Expression MicroModelica::IR::Statement::emptyRef ( )
protected

Definition at line 268 of file statement.cpp.

◆ generateExps()

ExpressionList MicroModelica::IR::Statement::generateExps ( STATEMENT::AssignTerm  asg)
protected

◆ hasRange()

bool MicroModelica::IR::Statement::hasRange ( )
inline

Definition at line 61 of file statement.hpp.

◆ initialize()

void MicroModelica::IR::Statement::initialize ( )
protected

Definition at line 63 of file statement.cpp.

◆ isAssignment()

bool MicroModelica::IR::Statement::isAssignment ( ) const

Definition at line 266 of file statement.cpp.

◆ isForStatement()

bool MicroModelica::IR::Statement::isForStatement ( ) const

Definition at line 171 of file statement.cpp.

◆ lhsDiscretes()

ExpressionList MicroModelica::IR::Statement::lhsDiscretes ( ) const
inline

Definition at line 72 of file statement.hpp.

◆ lhsStates()

ExpressionList MicroModelica::IR::Statement::lhsStates ( ) const
inline

Definition at line 73 of file statement.hpp.

◆ print()

string MicroModelica::IR::Statement::print ( ) const

Definition at line 197 of file statement.cpp.

References current_element, and TAB.

◆ printAssignment()

string MicroModelica::IR::Statement::printAssignment ( AST_Statement_Assign  asg) const
protected

Definition at line 173 of file statement.cpp.

◆ range()

Option<Range> MicroModelica::IR::Statement::range ( )
inline

Definition at line 76 of file statement.hpp.

◆ setRange()

void MicroModelica::IR::Statement::setRange ( )
protected

Definition at line 74 of file statement.cpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Statement s 
)
friend

Definition at line 297 of file statement.cpp.

Member Data Documentation

◆ _block

std::string MicroModelica::IR::Statement::_block
private

Definition at line 91 of file statement.hpp.

◆ _calledFunctions

Util::SymbolTable MicroModelica::IR::Statement::_calledFunctions
private

Definition at line 90 of file statement.hpp.

◆ _lhs_assignments

ExpressionList MicroModelica::IR::Statement::_lhs_assignments
private

Definition at line 92 of file statement.hpp.

◆ _lhs_discretes

ExpressionList MicroModelica::IR::Statement::_lhs_discretes
private

Definition at line 94 of file statement.hpp.

◆ _lhs_states

ExpressionList MicroModelica::IR::Statement::_lhs_states
private

Definition at line 95 of file statement.hpp.

◆ _range

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

Definition at line 89 of file statement.hpp.

◆ _rhs_assignments

ExpressionList MicroModelica::IR::Statement::_rhs_assignments
private

Definition at line 93 of file statement.hpp.

◆ _stm

AST_Statement MicroModelica::IR::Statement::_stm
private

Definition at line 88 of file statement.hpp.


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