MicroModelicaCCompiler  4.5.3
AST_Statement_When_ Class Reference

#include <statement.hpp>

Inheritance diagram for AST_Statement_When_:
Collaboration diagram for AST_Statement_When_:

Public Member Functions

 AST_Statement_When_ (AST_Expression cond, AST_StatementList, AST_Statement_ElseList, AST_Comment)
 
string print () const
 
AST_Expression condition () const
 
AST_StatementList statements () const
 
AST_Statement_ElseList else_when () const
 
AST_Comment comment () const
 
bool hasComment ()
 
bool hasElsewhen ()
 
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 _sts
 
AST_Statement_ElseList _else_list
 
AST_Comment _comm
 

Detailed Description

Definition at line 57 of file statement.hpp.

Constructor & Destructor Documentation

◆ AST_Statement_When_()

AST_Statement_When_::AST_Statement_When_ ( AST_Expression  cond,
AST_StatementList  sts,
AST_Statement_ElseList  else_st,
AST_Comment  c 
)

Definition at line 143 of file statement.cpp.

Member Function Documentation

◆ comment()

AST_Comment AST_Statement_When_::comment ( ) const

Definition at line 156 of file statement.cpp.

References _comm.

◆ condition()

AST_Expression AST_Statement_When_::condition ( ) const

Definition at line 150 of file statement.cpp.

References _cond.

Referenced by print().

◆ else_when()

AST_Statement_ElseList AST_Statement_When_::else_when ( ) const

Definition at line 154 of file statement.cpp.

References _else_list.

Referenced by print().

◆ hasComment()

bool AST_Statement_When_::hasComment ( )

Definition at line 158 of file statement.cpp.

References _comm.

◆ hasElsewhen()

bool AST_Statement_When_::hasElsewhen ( )

Definition at line 160 of file statement.cpp.

References _else_list.

◆ print()

string AST_Statement_When_::print ( ) const
virtual

Implements AST_Statement_.

Definition at line 162 of file statement.cpp.

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

Here is the call graph for this function:

◆ statements()

AST_StatementList AST_Statement_When_::statements ( ) const

Definition at line 152 of file statement.cpp.

References _sts.

Referenced by print().

◆ statementType()

StatementType AST_Statement_When_::statementType ( )
virtual

Implements AST_Statement_.

Definition at line 148 of file statement.cpp.

References STWHEN.

Member Data Documentation

◆ _comm

AST_Comment AST_Statement_When_::_comm
private

Definition at line 73 of file statement.hpp.

Referenced by comment(), and hasComment().

◆ _cond

AST_Expression AST_Statement_When_::_cond
private

Definition at line 70 of file statement.hpp.

Referenced by condition().

◆ _else_list

AST_Statement_ElseList AST_Statement_When_::_else_list
private

Definition at line 72 of file statement.hpp.

Referenced by else_when(), and hasElsewhen().

◆ _sts

AST_StatementList AST_Statement_When_::_sts
private

Definition at line 71 of file statement.hpp.

Referenced by statements().


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