GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
BehaviorTypeRenamer.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 
7 #ifndef GDCORE_BEHAVIORTYPERENAMER_H
8 #define GDCORE_BEHAVIORTYPERENAMER_H
9 #include <set>
10 
11 #include "GDCore/IDE/Project/ArbitraryObjectsWorker.h"
12 #include "GDCore/String.h"
13 
14 namespace gd {
15 class Object;
16 class Behavior;
17 } // namespace gd
18 
19 namespace gd {
20 
21 class GD_CORE_API BehaviorTypeRenamer : public ArbitraryObjectsWorker {
22  public:
23  BehaviorTypeRenamer(const gd::String& oldType_,
24  const gd::String& newType_)
25  : oldType(oldType_), newType(newType_){};
26  virtual ~BehaviorTypeRenamer();
27 
28  private:
29  void DoVisitObject(gd::Object& object) override;
30  void DoVisitBehavior(gd::Behavior& behavior) override;
31 
32  gd::String oldType;
33  gd::String newType;
34 };
35 
36 }; // namespace gd
37 
38 #endif // GDCORE_BEHAVIORTYPERENAMER_H
ArbitraryObjectsWorker is an abstract class used to browse objects (and behaviors) and do some work o...
Definition: ArbitraryObjectsWorker.h:30
Base class used to represents a behavior that can be applied to an object. It stores the content (i....
Definition: Behavior.h:23
Definition: BehaviorTypeRenamer.h:21
Represent an object of a platform.
Definition: Object.h:37
String represents an UTF8 encoded string.
Definition: String.h:31
Definition: CommonTools.h:24