GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
InstructionsTypeRenamer.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 InstructionsTypeRenamer_H
7 #define InstructionsTypeRenamer_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 
27 class GD_CORE_API InstructionsTypeRenamer : public ArbitraryEventsWorker {
28  public:
29  InstructionsTypeRenamer(const gd::Project& project_,
30  const gd::String& oldType_,
31  const gd::String& newType_)
32  : project(project_), oldType(oldType_), newType(newType_){};
33  virtual ~InstructionsTypeRenamer();
34 
35  private:
36  bool DoVisitInstruction(gd::Instruction& instruction,
37  bool isCondition) override;
38 
39  const gd::Project& project;
40  gd::String oldType;
41  gd::String newType;
42 };
43 
44 } // namespace gd
45 
46 #endif // InstructionsTypeRenamer_H
ArbitraryEventsWorker is an abstract class used to browse events (and instructions) and do some work ...
Definition: ArbitraryEventsWorker.h:36
An instruction is a member of an event: It can be a condition or an action.
Definition: Instruction.h:30
Replace in events all instructions of the specified type by another type.
Definition: InstructionsTypeRenamer.h:27
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:50
String represents an UTF8 encoded string.
Definition: String.h:31
Definition: CommonTools.h:24