A variable definition in the rule language. More...
#include <RuleBasedProgramTree.h>
Public Member Functions | |
Define (std::string variable, std::shared_ptr< Expression > value) | |
Constructs a variable definition in the rule language. | |
~Define () override | |
Destructor. | |
void | generateCode (CodeGenerationContext &context, RuleVM::Program &program) const override |
Generates code for this 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::string | variable |
The name of the variable. | |
std::shared_ptr< Expression > | value |
The value of the variable. | |
A variable definition in the rule language.
Variables are always constant.
autopas::RuleSyntax::Define::Define | ( | std::string | variable, |
std::shared_ptr< Expression > | value | ||
) |
Constructs a variable definition in the rule language.
variable | |
value |
|
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.