MicroModelicaCCompiler  4.5.3
AST_Statement_If_ Class Reference

#include <statement.hpp>

Inheritance diagram for AST_Statement_If_:
Collaboration diagram for AST_Statement_If_:

Public Member Functions

 AST_Statement_If_ (AST_Expression cond, AST_StatementList true_st, AST_Statement_ElseList, AST_StatementList false_st)
 
string print () const
 
AST_Expression condition () const
 
AST_StatementList statements () const
 
AST_StatementList else_statements () const
 
AST_Statement_ElseList else_if () const
 
virtual StatementType statementType ()
 
- Public Member Functions inherited from AST_Statement_
 DEFINE_CLASS_PRINTER (AST_Statement)
 
void accept (AST_Visitor *visitor)
 
 GET_AS (Statement, While)
 
 GET_AS (Statement, If)
 
 GET_AS (Statement, For)
 
 GET_AS (Statement, When)
 
 GET_AS (Statement, Assign)
 
 GET_AS (Statement, OutputAssigment)
 
- Public Member Functions inherited from AST_Node_
 AST_Node_ ()
 
virtual ~AST_Node_ ()
 
 DEFINE_CLASS_PRINTER (AST_Node)
 
 DEFINE_ORDER_REL (AST_Node)
 
void setLineNum (int linenum)
 
int lineNum () const
 

Private Attributes

AST_Expression _cond
 
AST_StatementList _true_st
 
AST_StatementList _false_st
 
AST_Statement_ElseList _else_list
 

Detailed Description

Definition at line 91 of file statement.hpp.

Constructor & Destructor Documentation

◆ AST_Statement_If_()

AST_Statement_If_::AST_Statement_If_ ( AST_Expression  cond,
AST_StatementList  true_st,
AST_Statement_ElseList  else_list,
AST_StatementList  false_st 
)

Definition at line 216 of file statement.cpp.

Member Function Documentation

◆ condition()

AST_Expression AST_Statement_If_::condition ( ) const

Definition at line 222 of file statement.cpp.

References _cond.

Referenced by print().

◆ else_if()

AST_Statement_ElseList AST_Statement_If_::else_if ( ) const

Definition at line 228 of file statement.cpp.

References _else_list.

Referenced by print().

◆ else_statements()

AST_StatementList AST_Statement_If_::else_statements ( ) const

Definition at line 226 of file statement.cpp.

References _false_st.

Referenced by print().

◆ print()

string AST_Statement_If_::print ( ) const
virtual

Implements AST_Statement_.

Definition at line 232 of file statement.cpp.

References BEGIN_BLOCK, condition(), current_element, else_if(), else_statements(), END_BLOCK, MAKE_SPACE, and statements().

Here is the call graph for this function:

◆ statements()

AST_StatementList AST_Statement_If_::statements ( ) const

Definition at line 224 of file statement.cpp.

References _true_st.

Referenced by print().

◆ statementType()

StatementType AST_Statement_If_::statementType ( )
virtual

Implements AST_Statement_.

Definition at line 230 of file statement.cpp.

References STIF.

Member Data Documentation

◆ _cond

AST_Expression AST_Statement_If_::_cond
private

Definition at line 102 of file statement.hpp.

Referenced by condition().

◆ _else_list

AST_Statement_ElseList AST_Statement_If_::_else_list
private

Definition at line 104 of file statement.hpp.

Referenced by else_if().

◆ _false_st

AST_StatementList AST_Statement_If_::_false_st
private

Definition at line 103 of file statement.hpp.

Referenced by else_statements().

◆ _true_st

AST_StatementList AST_Statement_If_::_true_st
private

Definition at line 103 of file statement.hpp.

Referenced by statements().


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