An if statement in the rule language. More...
#include <RuleBasedProgramTree.h>


Public Member Functions | |
| If (std::shared_ptr< Expression > condition, std::vector< std::shared_ptr< Statement > > consequences) | |
| Constructs an if statement in the rule language. | |
| void | generateCode (CodeGenerationContext &context, RuleVM::Program &program) const override |
| Generates code for this statement. | |
Public Member Functions inherited from autopas::RuleSyntax::Statement | |
| virtual | ~Statement ()=default |
| Virtual default constructor. | |
| virtual void | generateCode (CodeGenerationContext &context, RuleVM::Program &program) const =0 |
| Generates code for this statement. | |
Public Attributes | |
| std::shared_ptr< Expression > | condition |
| The condition of the if statement. | |
| std::vector< std::shared_ptr< Statement > > | consequences |
| The statements contained in the body of the if statement. | |
An if statement in the rule language.
| autopas::RuleSyntax::If::If | ( | std::shared_ptr< Expression > | condition, |
| std::vector< std::shared_ptr< Statement > > | consequences | ||
| ) |
Constructs an if statement in the rule language.
| condition | |
| consequences |
|
overridevirtual |
Generates code for this statement.
| context | The context to generate code in. |
| program | The program to append the code to. |
Implements autopas::RuleSyntax::Statement.
| std::vector<std::shared_ptr<Statement> > autopas::RuleSyntax::If::consequences |
The statements contained in the body of the if statement.
(Executed if true).