1#ifndef GENERATORSCOPE_H
2#define GENERATORSCOPE_H
35 this->indentation = identation;
47 GeneratorScope(std::vector<int> parentVars, std::vector<int> parentParams,
int parentIndentation) {
48 this->avaiableVarsID = parentVars;
49 this->avaiableParamsID = parentParams;
50 this->numberOfAddedVars = 0;
51 this->indentation = parentIndentation + 1;
The GeneratorScope class manages scopes in the generator.
Definition generatorScope.h:15
std::vector< int > avaiableParamsID
Definition generatorScope.h:22
std::vector< int > avaiableVarsID
Definition generatorScope.h:21
std::string getIndentationTabs(int=0)
Generates a string of tabs for code indentation.
Definition generatorScope.cpp:11
GeneratorScope(int identation=1)
Constructs a GeneratorScope with an optional initial indentation level.
Definition generatorScope.h:31
GeneratorScope(std::vector< int > parentVars, std::vector< int > parentParams, int parentIndentation)
Constructs a GeneratorScope based on a parent scope.
Definition generatorScope.h:47
void addVar(int id)
Adds a variable ID to the current scope.
Definition generatorScope.cpp:19
~GeneratorScope()
Destructor for the GeneratorScope class.
Definition generatorScope.h:59
int addParam()
Adds a new parameter ID to the current scope.
Definition generatorScope.cpp:24
int numberOfAddedVars
Definition generatorScope.h:20
int getVarCounter()
Gets the number of available variables in the current scope.
Definition generatorScope.cpp:3
int getIndentation()
Retrieves the current indentation level.
Definition generatorScope.cpp:7