The GeneratorFunction class represents a function in the generated code.
More...
#include <generatorFunction.h>
The GeneratorFunction class represents a function in the generated code.
This class is responsible for managing the lines of code within a function, including adding lines and retrieving them. It also handles function identifiers and determines where to insert new lines based on specific logic.
◆ GeneratorFunction() [1/2]
GeneratorFunction::GeneratorFunction |
( |
| ) |
|
|
inline |
◆ GeneratorFunction() [2/2]
GeneratorFunction::GeneratorFunction |
( |
int | id | ) |
|
|
inline |
Constructs a GeneratorFunction with a specific ID.
- Parameters
-
id | The unique identifier for the function. |
◆ ~GeneratorFunction()
GeneratorFunction::~GeneratorFunction |
( |
| ) |
|
|
default |
Destructor for the GeneratorFunction class.
Currently, this destructor does not perform any special operations.
◆ addLine() [1/2]
void GeneratorFunction::addLine |
( |
std::string | line | ) |
|
Adds a single line of code to the generator function.
- Parameters
-
line | The line of code to add. |
◆ addLine() [2/2]
void GeneratorFunction::addLine |
( |
std::vector< std::string > | lines | ) |
|
Adds multiple lines of code to the generator function.
This method takes a vector of strings, each representing a line of code, and adds them to the function.
- Parameters
-
lines | A vector of lines of code to add. |
◆ getId()
int GeneratorFunction::getId |
( |
| ) |
|
Gets the ID of the generator function.
- Returns
- The ID of the generator function.
◆ getLines()
std::vector< std::string > GeneratorFunction::getLines |
( |
| ) |
|
Retrieves the lines of code in the generator function.
- Returns
- A vector of strings, each representing a line of code.
◆ insertBack
bool GeneratorFunction::insertBack = false |
The documentation for this class was generated from the following files: