1#ifndef VARIABLEGENERATOR_H
2#define VARIABLEGENERATOR_H
34 virtual std::vector<std::string>
new_(
bool inFunction =
false) = 0;
43 virtual std::vector<std::string>
insert() = 0;
52 virtual std::vector<std::string>
remove() = 0;
62 virtual std::vector<std::string>
contains(
bool shouldReturn =
false) = 0;
72 virtual std::vector<std::string>
free() = 0;
104 virtual std::vector<std::string>
genParams(std::string paramName, std::vector<GeneratorVariable*> varsParams) = 0;
115 std::vector<std::string>
new_(
bool inFunction =
false)
override;
116 std::vector<std::string>
insert()
override;
117 std::vector<std::string>
remove()
override;
118 std::vector<std::string>
contains(
bool shouldReturn =
false)
override;
119 std::vector<std::string>
free()
override;
122 std::vector<std::string>
genParams(std::string paramName, std::vector<GeneratorVariable*> varsParams)
override;
153 std::vector<std::string>
new_(
bool inFunction =
false)
override;
154 std::vector<std::string>
insert()
override;
155 std::vector<std::string>
remove()
override;
156 std::vector<std::string>
contains(
bool shouldReturn =
false)
override;
157 std::vector<std::string>
free()
override;
160 std::vector<std::string>
genParams(std::string paramName, std::vector<GeneratorVariable*> varsParams)
override;
204 static std::vector<std::string>
genIncludes(std::string type);
214 static std::vector<std::string>
genGlobalVars(std::string type);
227 static std::vector<std::string>
genParams(std::string type, std::string paramName, std::vector<GeneratorVariable*> varsParams);
Class representing an array variable.
Definition generatorVariable.h:130
std::vector< std::string > genGlobalVars() override
Generates global variable declarations for the variable type.
Definition generatorVariable.cpp:110
std::vector< std::string > genParams(std::string paramName, std::vector< GeneratorVariable * > varsParams) override
Generates parameter handling code for functions using this variable type.
Definition generatorVariable.cpp:124
~GeneratorArray()
Destructor for the Array class.
Definition generatorVariable.cpp:135
std::vector< std::string > new_(bool inFunction=false) override
Creates a new variable.
Definition generatorVariable.cpp:42
std::vector< std::string > insert() override
Generates code to perform an insertion operation on the variable.
Definition generatorVariable.cpp:65
std::vector< std::string > genIncludes() override
Generates necessary include statements for the variable.
Definition generatorVariable.cpp:104
GeneratorArray()
Default constructor for the Array class.
Definition generatorVariable.h:137
std::vector< std::string > free() override
Generates code to free or release resources associated with the variable.
Definition generatorVariable.cpp:94
std::vector< std::string > remove() override
Generates code to perform a removal operation on the variable.
Definition generatorVariable.cpp:72
int totalSize
Definition generatorVariable.h:132
std::vector< std::string > contains(bool shouldReturn=false) override
Generates code to perform a contains operation on the variable.
Definition generatorVariable.cpp:79
Definition generatorVariable.h:107
GeneratorSortedList()
Definition generatorVariable.h:109
~GeneratorSortedList()
Definition generatorVariable.cpp:147
std::vector< std::string > contains(bool shouldReturn=false) override
Generates code to perform a contains operation on the variable.
Definition generatorVariable.cpp:250
std::vector< std::string > genParams(std::string paramName, std::vector< GeneratorVariable * > varsParams) override
Generates parameter handling code for functions using this variable type.
Definition generatorVariable.cpp:309
std::vector< std::string > genIncludes() override
Generates necessary include statements for the variable.
Definition generatorVariable.cpp:150
std::vector< std::string > free() override
Generates code to free or release resources associated with the variable.
Definition generatorVariable.cpp:267
std::vector< std::string > new_(bool inFunction=false) override
Creates a new variable.
Definition generatorVariable.cpp:156
std::vector< std::string > insert() override
Generates code to perform an insertion operation on the variable.
Definition generatorVariable.cpp:179
std::vector< std::string > remove() override
Generates code to perform a removal operation on the variable.
Definition generatorVariable.cpp:222
std::vector< std::string > genGlobalVars() override
Generates global variable declarations for the variable type.
Definition generatorVariable.cpp:288
Abstract base class for variable generation.
Definition generatorVariable.h:17
virtual std::vector< std::string > genIncludes()=0
Generates necessary include statements for the variable.
virtual std::vector< std::string > genParams(std::string paramName, std::vector< GeneratorVariable * > varsParams)=0
Generates parameter handling code for functions using this variable type.
virtual ~GeneratorVariable()
Definition generatorVariable.h:23
std::string name
Definition generatorVariable.h:20
virtual std::vector< std::string > insert()=0
Generates code to perform an insertion operation on the variable.
int id
Definition generatorVariable.h:19
virtual std::vector< std::string > contains(bool shouldReturn=false)=0
Generates code to perform a contains operation on the variable.
virtual std::vector< std::string > remove()=0
Generates code to perform a removal operation on the variable.
virtual std::vector< std::string > new_(bool inFunction=false)=0
Creates a new variable.
std::string typeString
Definition generatorVariable.h:21
virtual std::vector< std::string > genGlobalVars()=0
Generates global variable declarations for the variable type.
virtual std::vector< std::string > free()=0
Generates code to free or release resources associated with the variable.
Factory class for creating generator variables.
Definition generatorVariable.h:169
static std::vector< std::string > genGlobalVars(std::string type)
Generates global variable declarations for the specified variable type.
Definition generatorVariable.cpp:19
static std::vector< std::string > genIncludes(std::string type)
Generates include statements required for the specified variable type.
Definition generatorVariable.cpp:12
static std::vector< std::string > genParams(std::string type, std::string paramName, std::vector< GeneratorVariable * > varsParams)
Generates parameter handling code for functions using the specified variable type.
Definition generatorVariable.cpp:26
static std::string genTypeString(std::string type)
Generates a string representation of the variable type.
Definition generatorVariable.cpp:5
static GeneratorVariable * createVariable(std::string type, int identifier)
Creates a GeneratorVariable of the specified type.
Definition factory.cpp:3
static unsigned int var_counter
Definition generatorVariable.h:171