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
- Related Pages
- Modules
- Namespaces
- 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
18 class GD_API EventsCodeGenerator : public gd::EventsCodeGenerator
19 {
20 public:
21
31 static std::string GenerateSceneEventsCompleteCode(gd::Project & project, gd::Layout & scene, std::vector < gd::BaseEventSPtr > & events, bool compilationForRuntime = false);
32
42 static std::string GenerateExternalEventsCompleteCode(gd::Project & project, gd::ExternalEvents & events, bool compilationForRuntime = false);
43
47 void PreprocessEventList( std::vector < gd::BaseEventSPtr > & listEvent );
48
49 protected:
50 virtual std::string GenerateParameterCodes(const std::string & parameter, const gd::ParameterMetadata & metadata,
51 gd::EventsCodeGenerationContext & context,
52 const std::vector < gd::Expression > & othersParameters,
53 std::vector < std::pair<std::string, std::string> > * supplementaryParametersTypes);
54
55 virtual std::string GenerateCurrentObjectFunctionCall(std::string objectListName,
56 const gd::ObjectMetadata & objMetadata,
57 std::string functionCallName,
58 std::string parametersStr,
59 gd::EventsCodeGenerationContext & context);
60 virtual std::string GenerateNotPickedObjectFunctionCall(std::string objectListName,
61 const gd::ObjectMetadata & objMetadata,
62 std::string functionCallName,
63 std::string parametersStr,
64 std::string defaultOutput,
65 gd::EventsCodeGenerationContext & context);
66
67 virtual std::string GenerateCurrentObjectAutomatismFunctionCall(std::string objectListName,
68 std::string automatismName,
69 const gd::AutomatismMetadata & autoInfo,
70 std::string functionCallName,
71 std::string parametersStr,
72 gd::EventsCodeGenerationContext & context);
73
74 virtual std::string GenerateNotPickedObjectAutomatismFunctionCall(std::string objectListName,
75 std::string automatismName,
76 const gd::AutomatismMetadata & autoInfo,
77 std::string functionCallName,
78 std::string parametersStr,
79 std::string defaultOutput,
80 gd::EventsCodeGenerationContext & context);
81
82 virtual std::string GenerateObjectCondition(const std::string & objectName,
83 const gd::ObjectMetadata & objInfo,
84 const std::vector<std::string> & arguments,
85 const gd::InstructionMetadata & instrInfos,
86 const std::string & returnBoolean,
87 bool conditionInverted,
88 gd::EventsCodeGenerationContext & context);
89
90 virtual std::string GenerateAutomatismCondition(const std::string & objectName,
91 const std::string & automatismName,
92 const gd::AutomatismMetadata & autoInfo,
93 const std::vector<std::string> & arguments,
94 const gd::InstructionMetadata & instrInfos,
95 const std::string & returnBoolean,
96 bool conditionInverted,
97 gd::EventsCodeGenerationContext & context);
98
99 virtual std::string GenerateObjectAction(const std::string & objectName,
100 const gd::ObjectMetadata & objInfo,
101 const std::vector<std::string> & arguments,
102 const gd::InstructionMetadata & instrInfos,
103 gd::EventsCodeGenerationContext & context);
104
105 virtual std::string GenerateAutomatismAction(const std::string & objectName,
106 const std::string & automatismName,
107 const gd::AutomatismMetadata & autoInfo,
108 const std::vector<std::string> & arguments,
109 const gd::InstructionMetadata & instrInfos,
110 gd::EventsCodeGenerationContext & context);
111
115 EventsCodeGenerator(gd::Project & project, const gd::Layout & layout);
116 virtual ~EventsCodeGenerator();
117 };
118
119 #endif // EventsCodeGenerator_H
120 #endif