AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
autopas::RuleSyntax::Expression Struct Referenceabstract

An expression in the rule language. More...

#include <RuleBasedProgramTree.h>

Inheritance diagram for autopas::RuleSyntax::Expression:
Inheritance graph
[legend]

Public Member Functions

virtual ~Expression ()=default
 Virtual default constructor.
 
virtual Type getType () const =0
 
virtual void generateCode (CodeGenerationContext &context, RuleVM::Program &program) const =0
 Generates code for evaluating this expression at runtime.
 

Detailed Description

An expression in the rule language.

Member Function Documentation

◆ generateCode()

virtual void autopas::RuleSyntax::Expression::generateCode ( CodeGenerationContext context,
RuleVM::Program program 
) const
pure virtual

Generates code for evaluating this expression at runtime.

Value is put on top of the stack. May consume part of the stack.

Parameters
contextThe context to generate the code in.
programThe program to append the code to.

Implemented in autopas::RuleSyntax::Literal, autopas::RuleSyntax::Variable, autopas::RuleSyntax::UnaryOperator, and autopas::RuleSyntax::BinaryOperator.

◆ getType()

virtual Type autopas::RuleSyntax::Expression::getType ( ) const
pure virtual

The documentation for this struct was generated from the following file: