AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
autopas::RuleSyntax::DefineList Struct Reference

A list definition in the rule language. More...

#include <RuleBasedProgramTree.h>

Inheritance diagram for autopas::RuleSyntax::DefineList:
Inheritance graph
[legend]
Collaboration diagram for autopas::RuleSyntax::DefineList:
Collaboration graph
[legend]

Public Member Functions

 DefineList (std::string listName, std::vector< Literal > values)
 Constructs a list definition.
 
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::string listName
 The name of the list.
 
std::vector< Literalvalues
 The values in the list.
 

Detailed Description

A list definition in the rule language.

Constructor & Destructor Documentation

◆ DefineList()

autopas::RuleSyntax::DefineList::DefineList ( std::string  listName,
std::vector< Literal values 
)

Constructs a list definition.

Parameters
listNameThe list name.
valuesThe values in the list.

Member Function Documentation

◆ generateCode()

void autopas::RuleSyntax::DefineList::generateCode ( CodeGenerationContext context,
RuleVM::Program program 
) const
overridevirtual

Generates code for this statement.

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

Implements autopas::RuleSyntax::Statement.


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