GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
InstructionValidator.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-2025 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 #pragma once
7 
8 #include <vector>
9 
10 namespace gd {
11 class Platform;
12 class ProjectScopedContainers;
13 class ObjectsContainersList;
14 class Instruction;
15 class InstructionMetadata;
16 class String;
17 } // namespace gd
18 
19 namespace gd {
20 
21 class GD_CORE_API InstructionValidator {
22 public:
23  static bool
24  IsParameterValid(const gd::Platform &platform,
25  const gd::ProjectScopedContainers projectScopedContainers,
26  const gd::Instruction &instruction,
27  const InstructionMetadata &metadata,
28  std::size_t parameterIndex, const gd::String &value);
29 
30  static gd::String GetRootVariableName(const gd::String &name);
31 
32 private:
33  static bool
34  HasRequiredBehaviors(const gd::Instruction &instruction,
35  const gd::InstructionMetadata &instructionMetadata,
36  std::size_t objectParameterIndex,
37  const gd::ObjectsContainersList &objectsContainersList);
38 };
39 
40 } // namespace gd
An instruction is a member of an event: It can be a condition or an action.
Definition: Instruction.h:30
Describe user-friendly information about an instruction (action or condition), its parameters and the...
Definition: InstructionMetadata.h:39
Definition: InstructionValidator.h:21
A list of objects containers, useful for accessing objects in a scoped way, along with methods to acc...
Definition: ObjectsContainersList.h:29
Base class for implementing a platform.
Definition: Platform.h:42
Holds references to variables, objects, properties and other containers.
Definition: ProjectScopedContainers.h:35
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24