Game Develop C++ Platform: EventsCodeGenerator.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
EventsCodeGenerator.h
Go to the documentation of this file.
1
6 #if defined(GD_IDE_ONLY)
7
8 #ifndef EventsCodeGenerator_H
9 #define EventsCodeGenerator_H
10 #include <vector>
11 #include <string>
12 #include "GDCore/Events/Event.h"
13 #include "GDCore/Events/EventsCodeGenerator.h"
14 namespace gd { class ObjectMetadata; }
15 namespace gd { class AutomatismMetadata; }
16 namespace gd { class InstructionMetadata; }
17 namespace gd { class ExpressionCodeGenerationInformation; }
18
19 class GD_API EventsCodeGenerator : public gd::EventsCodeGenerator
20 {
21 friend class VariableCodeGenerationCallbacks;
22 public:
23
33 static std::string GenerateSceneEventsCompleteCode(gd::Project & project, gd::Layout & scene, std::vector < gd::BaseEventSPtr > & events, bool compilationForRuntime = false);
34
44 static std::string GenerateExternalEventsCompleteCode(gd::Project & project, gd::ExternalEvents & events, bool compilationForRuntime = false);
45
49 void PreprocessEventList( std::vector < gd::BaseEventSPtr > & listEvent );
50
51 protected:
52 virtual std::string GenerateParameterCodes(const std::string & parameter, const gd::ParameterMetadata & metadata,
53 gd::EventsCodeGenerationContext & context,
54 const std::string & previousParameter,
55 std::vector < std::pair<std::string, std::string> > * supplementaryParametersTypes);
56
57 virtual std::string GenerateObjectFunctionCall(std::string objectListName,
58 const gd::ObjectMetadata & objMetadata,
59 const gd::ExpressionCodeGenerationInformation & codeInfo,
60 std::string parametersStr,
61 std::string defaultOutput,
62 gd::EventsCodeGenerationContext & context);
63
64 virtual std::string GenerateObjectAutomatismFunctionCall(std::string objectListName,
65 std::string automatismName,
66 const gd::AutomatismMetadata & autoInfo,
67 const gd::ExpressionCodeGenerationInformation & codeInfo,
68 std::string parametersStr,
69 std::string defaultOutput,
70 gd::EventsCodeGenerationContext & context);
71
72 virtual std::string GenerateObjectCondition(const std::string & objectName,
73 const gd::ObjectMetadata & objInfo,
74 const std::vector<std::string> & arguments,
75 const gd::InstructionMetadata & instrInfos,
76 const std::string & returnBoolean,
77 bool conditionInverted,
78 gd::EventsCodeGenerationContext & context);
79
80 virtual std::string GenerateAutomatismCondition(const std::string & objectName,
81 const std::string & automatismName,
82 const gd::AutomatismMetadata & autoInfo,
83 const std::vector<std::string> & arguments,
84 const gd::InstructionMetadata & instrInfos,
85 const std::string & returnBoolean,
86 bool conditionInverted,
87 gd::EventsCodeGenerationContext & context);
88
89 virtual std::string GenerateObjectAction(const std::string & objectName,
90 const gd::ObjectMetadata & objInfo,
91 const std::vector<std::string> & arguments,
92 const gd::InstructionMetadata & instrInfos,
93 gd::EventsCodeGenerationContext & context);
94
95 virtual std::string GenerateAutomatismAction(const std::string & objectName,
96 const std::string & automatismName,
97 const gd::AutomatismMetadata & autoInfo,
98 const std::vector<std::string> & arguments,
99 const gd::InstructionMetadata & instrInfos,
100 gd::EventsCodeGenerationContext & context);
101
105 EventsCodeGenerator(gd::Project & project, const gd::Layout & layout);
106 virtual ~EventsCodeGenerator();
107 };
108
109 #endif // EventsCodeGenerator_H
110 #endif