GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
GDCore
IDE
Events
EventsParameterReplacer.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
#pragma once
7
8
#include <map>
9
#include <memory>
10
#include <unordered_map>
11
#include <unordered_set>
12
#include <vector>
13
14
#include "GDCore/IDE/Events/ArbitraryEventsWorker.h"
15
#include "GDCore/String.h"
16
namespace
gd
{
17
class
BaseEvent;
18
class
PropertiesContainer;
19
class
EventsList;
20
class
Platform;
21
}
// namespace gd
22
23
namespace
gd
{
30
class
GD_CORE_API
EventsParameterReplacer
31
:
public
ArbitraryEventsWorkerWithContext
{
32
public
:
33
EventsParameterReplacer
(
34
const
gd::Platform
&platform_,
35
const
std::unordered_map<gd::String, gd::String> &oldToNewPropertyNames_)
36
: platform(platform_),
37
oldToNewPropertyNames(oldToNewPropertyNames_){};
38
virtual
~
EventsParameterReplacer
();
39
40
static
bool
CanContainParameter(
const
gd::ValueTypeMetadata
&valueTypeMetadata);
41
42
private
:
43
bool
DoVisitInstruction(
gd::Instruction
&instruction,
44
bool
isCondition)
override
;
45
bool
DoVisitEventExpression(
gd::Expression
&expression,
46
const
gd::ParameterMetadata
&metadata)
override
;
47
48
const
gd::Platform
&platform;
49
const
std::unordered_map<gd::String, gd::String> &oldToNewPropertyNames;
50
};
51
52
}
// namespace gd
gd::ArbitraryEventsWorkerWithContext
An events worker that will know about the context (the objects container). Useful for workers working...
Definition:
ArbitraryEventsWorker.h:136
gd::EventsParameterReplacer
Replace in expressions and in parameters of actions or conditions, references to the name of a parame...
Definition:
EventsParameterReplacer.h:31
gd::Expression
Class representing an expression used as a parameter of a gd::Instruction. This class is nothing more...
Definition:
Expression.h:30
gd::Instruction
An instruction is a member of an event: It can be a condition or an action.
Definition:
Instruction.h:30
gd::ParameterMetadata
Describe a parameter of an instruction (action, condition) or of an expression: type,...
Definition:
ParameterMetadata.h:27
gd::Platform
Base class for implementing a platform.
Definition:
Platform.h:42
gd::ValueTypeMetadata
Define a type for parameters of a function (action, condition or expression) or the returned value of...
Definition:
ValueTypeMetadata.h:26
gd
Definition:
CommonTools.h:24
Generated by
1.9.1