Game Develop C++ Platform: VariableParserCallbacks.h Source File

| Game Develop C++ Platform Platform for developing native games based on OpenGL and SFML with Game Develop

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Groups Pages
VariableParserCallbacks.h
Go to the documentation of this file.
1
5 #if defined(GD_IDE_ONLY)
6 #ifndef VARIABLEPARSERCALLBACKS_H
7 #define VARIABLEPARSERCALLBACKS_H
8
9 #include <string>
10 #include <vector>
11 #include "GDCore/Events/VariableParser.h"
12
21 class VariableCodeGenerationCallbacks : public gd::VariableParserCallbacks
22 {
23 public:
24
25 enum VariableScope {
26 LAYOUT_VARIABLE = 0,
27 PROJECT_VARIABLE,
28 OBJECT_VARIABLE
29 };
30
38 VariableCodeGenerationCallbacks(std::string & output, gd::EventsCodeGenerator & codeGenerator_,
39 gd::EventsCodeGenerationContext & context_, const VariableScope & scope_);
48 VariableCodeGenerationCallbacks(std::string & output, gd::EventsCodeGenerator & codeGenerator_,
49 gd::EventsCodeGenerationContext & context_, const std::string & object);
50
55 virtual void OnRootVariable(std::string variableName);
56
61 virtual void OnChildVariable(std::string variableName);
62
68 virtual void OnChildSubscript(std::string stringExpression);
69
70 private:
71 std::string & output;
72 gd::EventsCodeGenerator & codeGenerator;
73 gd::EventsCodeGenerationContext & context;
74 VariableScope scope;
75 const std::string object;
76 };
77
78 #endif // VARIABLEPARSERCALLBACKS_H
79 #endif