GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
EventsBehaviorRenamer.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 EventsBehaviorRenamer_H
7 #define EventsBehaviorRenamer_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 Platform;
16 class EventsList;
17 } // namespace gd
18 
19 namespace gd {
20 
28  public:
29  EventsBehaviorRenamer(const gd::Platform &platform_,
30  const gd::String& objectName_,
31  const gd::String& oldBehaviorName_,
32  const gd::String& newBehaviorName_) :
33  platform(platform_),
34  objectName(objectName_),
35  oldBehaviorName(oldBehaviorName_),
36  newBehaviorName(newBehaviorName_)
37  {};
38  virtual ~EventsBehaviorRenamer();
39 
40  private:
41  bool DoVisitInstruction(gd::Instruction &instruction,
42  bool isCondition) override;
43 
44  const gd::Platform &platform;
45  gd::String objectName;
46  gd::String oldBehaviorName;
47  gd::String newBehaviorName;
48 };
49 
50 } // namespace gd
51 
52 #endif // EventsBehaviorRenamer_H
An events worker that will know about the context (the objects container). Useful for workers working...
Definition: ArbitraryEventsWorker.h:136
Replace in expressions and in parameters of actions or conditions, references to the name of a behavi...
Definition: EventsBehaviorRenamer.h:27
An instruction is a member of an event: It can be a condition or an action.
Definition: Instruction.h:30
Base class for implementing a platform.
Definition: Platform.h:42
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24