BenchGen
BenchGen is a tool for generating benchmarks to stress-test a computing system.
Loading...
Searching...
No Matches
generatorFunction.h
Go to the documentation of this file.
1#ifndef GENERATORFUNCTION_H
2#define GENERATORFUNCTION_H
3#include "../shared/enums.h"
5
14 private:
15 int id; // The unique identifier for this function
16 std::vector<std::string> lines; // The lines of code that make up the function
17
18 public:
19 bool insertBack = false; // Flag to determine where to insert new lines in the function
20
27
33 GeneratorFunction(int id) : id(id) {}
34
40 ~GeneratorFunction() = default;
41
47 int getId();
48
54 std::vector<std::string> getLines();
55
61 void addLine(std::string);
62
71 void addLine(std::vector<std::string>);
72};
73
74#endif
The GeneratorFunction class represents a function in the generated code.
Definition generatorFunction.h:13
GeneratorFunction()
Default constructor for GeneratorFunction.
Definition generatorFunction.h:26
bool insertBack
Definition generatorFunction.h:19
~GeneratorFunction()=default
Destructor for the GeneratorFunction class.
int getId()
Gets the ID of the generator function.
Definition generatorFunction.cpp:3
void addLine(std::string)
Adds a single line of code to the generator function.
Definition generatorFunction.cpp:11
std::vector< std::string > getLines()
Retrieves the lines of code in the generator function.
Definition generatorFunction.cpp:7
GeneratorFunction(int id)
Constructs a GeneratorFunction with a specific ID.
Definition generatorFunction.h:33