GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
EventsTypesLister.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 EventsTypesLister_H
7 #define EventsTypesLister_H
8 #include <map>
9 #include <memory>
10 #include <vector>
11 #include "GDCore/IDE/Events/ArbitraryEventsWorker.h"
12 #include "GDCore/String.h"
13 namespace gd {
14 class BaseEvent;
15 class Project;
16 class EventsList;
17 } // namespace gd
18 
19 namespace gd {
20 
26 class GD_CORE_API EventsTypesLister : public ArbitraryEventsWorker {
27  public:
28  EventsTypesLister(const gd::Project& project_) : project(project_){};
29  virtual ~EventsTypesLister();
30 
34  const std::vector<gd::String>& GetAllEventsTypes() { return allEventsTypes; }
35 
39  const std::vector<gd::String>& GetAllConditionsTypes() {
40  return allConditionsTypes;
41  }
42 
46  const std::vector<gd::String>& GetAllActionsTypes() {
47  return allActionsTypes;
48  }
49 
50  private:
51  bool DoVisitEvent(gd::BaseEvent& event) override;
52  bool DoVisitInstruction(gd::Instruction& instruction,
53  bool isCondition) override;
54 
55  std::vector<gd::String> allEventsTypes;
56  std::vector<gd::String> allConditionsTypes;
57  std::vector<gd::String> allActionsTypes;
58  const gd::Project& project;
59 };
60 
61 } // namespace gd
62 
63 #endif // EventsTypesLister_H
ArbitraryEventsWorker is an abstract class used to browse events (and instructions) and do some work ...
Definition: ArbitraryEventsWorker.h:36
Base class defining an event.
Definition: Event.h:44
List the values of the parameters of events and their type.
Definition: EventsTypesLister.h:26
const std::vector< gd::String > & GetAllActionsTypes()
Definition: EventsTypesLister.h:46
const std::vector< gd::String > & GetAllConditionsTypes()
Definition: EventsTypesLister.h:39
const std::vector< gd::String > & GetAllEventsTypes()
Definition: EventsTypesLister.h:34
An instruction is a member of an event: It can be a condition or an action.
Definition: Instruction.h:30
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:50
Definition: CommonTools.h:24