GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
EventsVariablesFinder.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-2016 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 #ifndef EVENTSVARIABLESFINDER_H
7 #define EVENTSVARIABLESFINDER_H
8 #include <set>
9 #include <vector>
10 #include "GDCore/Events/Event.h"
11 #include "GDCore/String.h"
12 namespace gd {
13 class Instruction;
14 class Platform;
15 class Object;
16 class Project;
17 class Layout;
18 } // namespace gd
19 
20 namespace gd {
21 
33  public:
35  virtual ~EventsVariablesFinder(){};
36 
44  static std::set<gd::String> FindAllGlobalVariables(
45  const gd::Platform& platform, const gd::Project& project);
46 
55  static std::set<gd::String> FindAllLayoutVariables(
56  const gd::Platform& platform,
57  const gd::Project& project,
58  const gd::Layout& layout);
59 
69  static std::set<gd::String> FindAllObjectVariables(
70  const gd::Platform& platform,
71  const gd::Project& project,
72  const gd::Layout& layout,
73  const gd::String& objectName);
74 
75  private:
76 
92  static void FindArgumentsInEventsAndDependencies(
93  std::set<gd::String>& results,
94  const gd::Platform& platform,
95  const gd::Project& project,
96  const gd::Layout& layout,
97  const gd::String& parameterType,
98  const gd::String& objectName = "");
99 };
100 
101 } // namespace gd
102 
103 #endif // EVENTSVARIABLESFINDER_H
Perform a search over a project or a layout, searching for layout, global or object variables.
Definition: EventsVariablesFinder.h:32
static std::set< gd::String > FindAllObjectVariables(const gd::Platform &platform, const gd::Project &project, const gd::Layout &layout, const gd::String &objectName)
Definition: EventsVariablesFinder.cpp:230
static std::set< gd::String > FindAllLayoutVariables(const gd::Platform &platform, const gd::Project &project, const gd::Layout &layout)
Definition: EventsVariablesFinder.cpp:214
static std::set< gd::String > FindAllGlobalVariables(const gd::Platform &platform, const gd::Project &project)
Definition: EventsVariablesFinder.cpp:198
Represent a layout ( also called a scene ) of a project.
Definition: Layout.h:40
Base class for implementing a platform.
Definition: Platform.h:42
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:51
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24