Game Develop Core: ExpressionsCodeGeneration.h Source File

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
ExpressionsCodeGeneration.h
Go to the documentation of this file.
1
5 #ifndef EXPRESSIONSCODEGENERATION_H
6 #define EXPRESSIONSCODEGENERATION_H
7
8 #include <vector>
9 #include <string>
10 #include "GDCore/Events/ExpressionParser.h"
11 namespace gd { class ExpressionMetadata; }
12 namespace gd { class StrExpressionMetadata; }
13 namespace gd { class Expression; }
14 namespace gd { class Project; }
15 namespace gd { class Layout; }
16 namespace gd { class Layout; }
17 namespace gd { class EventsCodeGenerationContext; }
18 namespace gd { class EventsCodeGenerator; }
19
20 namespace gd
21 {
22
38 class GD_CORE_API CallbacksForGeneratingExpressionCode : public gd::ParserCallbacks
39 {
40 public:
41 CallbacksForGeneratingExpressionCode(std::string & output, EventsCodeGenerator & codeGenerator_, EventsCodeGenerationContext & context_);
42 virtual ~CallbacksForGeneratingExpressionCode() {};
43
44 void OnConstantToken(std::string text);
45 void OnNumber(std::string text);
46 void OnOperator(std::string text);
47 void OnStaticFunction(std::string functionName, const std::vector<gd::Expression> & parameters, const gd::ExpressionMetadata & expressionInfo);
48 void OnStaticFunction(std::string functionName, const std::vector<gd::Expression> & parameters, const gd::StrExpressionMetadata & expressionInfo);
49 void OnObjectFunction(std::string functionName, const std::vector<gd::Expression> & parameters, const gd::ExpressionMetadata & expressionInfo);
50 void OnObjectFunction(std::string functionName, const std::vector<gd::Expression> & parameters, const gd::StrExpressionMetadata & expressionInfo);
51 void OnObjectAutomatismFunction(std::string functionName, const std::vector<gd::Expression> & parameters, const gd::ExpressionMetadata & expressionInfo);
52 void OnObjectAutomatismFunction(std::string functionName, const std::vector<gd::Expression> & parameters, const gd::StrExpressionMetadata & expressionInfo);
53 bool OnSubMathExpression(const gd::Platform & platform, const gd::Project & project, const gd::Layout & layout, gd::Expression & expression);
54 bool OnSubTextExpression(const gd::Platform & platform, const gd::Project & project, const gd::Layout & layout, gd::Expression & expression);
55
56 private:
57 std::string & plainExpression;
58 EventsCodeGenerator & codeGenerator;
59 EventsCodeGenerationContext & context;
60 };
61
62 }
63
64 #endif // EXPRESSIONSCODEGENERATION_H