GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
UnfilledRequiredBehaviorPropertyProblem.h
1 /*
2  * GDevelop Core
3  * Copyright 2008-2021 Florian Rival ([email protected]). All rights
4  * reserved. This project is released under the MIT License.
5  */
6 
7 #ifndef GDCORE_UNFILLEDREQUIREDBEHAVIORPROPERTYPROBLEM_H
8 #define GDCORE_UNFILLEDREQUIREDBEHAVIORPROPERTYPROBLEM_H
9 #include "GDCore/String.h"
10 
11 namespace gd {
12 class Project;
13 class Object;
14 class Behavior;
15 } // namespace gd
16 
17 namespace gd {
18 
23  public:
25  const gd::Project& sourceProject_,
26  gd::Object& sourceObject_,
27  gd::Behavior& sourceBehavior_,
28  const gd::String& sourcePropertyName_,
29  const gd::String& expectedBehaviorTypeName_)
30  : sourceProject(sourceProject_),
31  sourceObject(sourceObject_),
32  sourceBehavior(sourceBehavior_),
33  sourcePropertyName(sourcePropertyName_),
34  expectedBehaviorTypeName(expectedBehaviorTypeName_){};
36 
40  virtual const gd::Project& GetSourceProject() const { return sourceProject; }
41 
45  virtual gd::Object& GetSourceObject() const { return sourceObject; }
46 
51  return sourceBehavior;
52  }
53 
57  virtual const gd::String& GetSourcePropertyName() const {
58  return sourcePropertyName;
59  }
60 
65  virtual const gd::String& GetExpectedBehaviorTypeName() const {
66  return expectedBehaviorTypeName;
67  }
68 
69  private:
70  const gd::Project& sourceProject;
71  gd::Object& sourceObject;
72  gd::Behavior& sourceBehavior;
73  const gd::String sourcePropertyName;
74 
75  const gd::String expectedBehaviorTypeName;
76 };
77 
78 } // namespace gd
79 
80 #endif // GDCORE_UNFILLEDREQUIREDBEHAVIORPROPERTYPROBLEM_H
Base class used to represents a behavior that can be applied to an object. It stores the content (i....
Definition: Behavior.h:23
Represent an object of a platform.
Definition: Object.h:37
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:51
String represents an UTF8 encoded string.
Definition: String.h:33
A problem when a required behavior property is not fill correctly.
Definition: UnfilledRequiredBehaviorPropertyProblem.h:22
virtual const gd::String & GetSourcePropertyName() const
Return the property where the problem appears.
Definition: UnfilledRequiredBehaviorPropertyProblem.h:57
virtual gd::Behavior & GetSourceBehaviorContent() const
Return the behavior where the problem appears.
Definition: UnfilledRequiredBehaviorPropertyProblem.h:50
virtual const gd::String & GetExpectedBehaviorTypeName() const
Return the behavior type name that is expected for the required behavior property.
Definition: UnfilledRequiredBehaviorPropertyProblem.h:65
virtual gd::Object & GetSourceObject() const
Return the object where the problem appears.
Definition: UnfilledRequiredBehaviorPropertyProblem.h:45
virtual const gd::Project & GetSourceProject() const
Return the project where the problem appears.
Definition: UnfilledRequiredBehaviorPropertyProblem.h:40
Definition: CommonTools.h:24