6 #if defined(GD_IDE_ONLY)
7 #ifndef GDCORE_EVENTSFUNCTION_H
8 #define GDCORE_EVENTSFUNCTION_H
12 #include "GDCore/Events/EventsList.h"
13 #include "GDCore/Project/ObjectGroupsContainer.h"
14 #include "GDCore/String.h"
15 #include "GDCore/Extensions/Metadata/ValueTypeMetadata.h"
19 #include "GDCore/Extensions/Metadata/InstructionMetadata.h"
21 class SerializerElement;
23 class EventsFunctionsContainer;
60 description = description_;
103 sentence = sentence_;
131 getterName = getterName_;
139 expressionType = type;
157 ExpressionAndCondition,
158 ActionWithOperator };
177 return functionType == gd::EventsFunction::Action ||
178 functionType == gd::EventsFunction::ActionWithOperator;
187 return functionType == gd::EventsFunction::Expression ||
188 functionType == gd::EventsFunction::ExpressionAndCondition;
197 return functionType == gd::EventsFunction::Condition ||
198 functionType == gd::EventsFunction::ExpressionAndCondition;
210 isPrivate = _isPrivate;
244 const std::vector<gd::ParameterMetadata>& GetParametersForEvents(
302 FunctionType functionType;
303 std::vector<gd::ParameterMetadata> parameters;
304 mutable std::vector<gd::ParameterMetadata> actionWithOperationParameters;
306 bool isPrivate =
false;
307 bool isAsync =
false;
Events that can be generated as a stand-alone function, and used as a condition, action or expression...
Definition: EventsFunction.h:39
const gd::String & GetFullName() const
Get the name of the function, that is displayed in the editor.
Definition: EventsFunction.h:82
EventsFunction & SetAsync(bool _isAsync)
Sets the asynchronicity of the function.
Definition: EventsFunction.h:222
const gd::EventsList & GetEvents() const
Return the events.
Definition: EventsFunction.h:230
std::vector< gd::ParameterMetadata > & GetParameters()
Return the parameters.
Definition: EventsFunction.h:264
const gd::String & GetGroup() const
Get the group of the instruction in the editor.
Definition: EventsFunction.h:110
EventsFunction & SetFunctionType(FunctionType type)
Set the type of the function.
Definition: EventsFunction.h:163
EventsFunction & SetPrivate(bool _isPrivate)
Sets the privateness of the function.
Definition: EventsFunction.h:209
const gd::ValueTypeMetadata & GetExpressionType() const
Get the type of the expression.
Definition: EventsFunction.h:146
ObjectGroupsContainer & GetObjectGroups()
Return a reference to the object groups that can be used in the function.
Definition: EventsFunction.h:270
bool IsExpression() const
Return true if the function is an expression.
Definition: EventsFunction.h:186
bool IsAction() const
Return true if the function is an action.
Definition: EventsFunction.h:176
EventsFunction & SetDescription(const gd::String &description_)
Set the description of the function, to be displayed in the editor.
Definition: EventsFunction.h:59
FunctionType GetFunctionType() const
Get the type of the function.
Definition: EventsFunction.h:171
gd::EventsList & GetEvents()
Return the events.
Definition: EventsFunction.h:235
gd::ValueTypeMetadata & GetExpressionType()
Get the type of the expression.
Definition: EventsFunction.h:151
EventsFunction * Clone() const
Return a pointer to a new EventsFunction constructed from this one.
Definition: EventsFunction.h:48
EventsFunction & SetName(const gd::String &name_)
Set the name of the function, to be used for the action/condition/expression name.
Definition: EventsFunction.h:74
EventsFunction & SetGroup(const gd::String &group_)
Set the group of the instruction in the editor.
Definition: EventsFunction.h:115
bool IsAsync() const
Returns true if the function is async.
Definition: EventsFunction.h:217
bool IsCondition() const
Return true if the function is a condition.
Definition: EventsFunction.h:196
EventsFunction & SetExpressionType(const gd::ValueTypeMetadata &type)
Set the type of the expression.
Definition: EventsFunction.h:138
const std::vector< gd::ParameterMetadata > & GetParameters() const
Return the parameters of the function that are filled in the editor.
Definition: EventsFunction.h:257
const gd::String & GetSentence() const
Get the sentence of the function, that is used for the condition/action in the Events Editor.
Definition: EventsFunction.h:96
const gd::String & GetName() const
Get the name of the function, to be used for the action/condition/expression name.
Definition: EventsFunction.h:68
const ObjectGroupsContainer & GetObjectGroups() const
Return a const reference to the object groups that can be used in the function.
Definition: EventsFunction.h:276
EventsFunction & SetGetterName(const gd::String &getterName_)
Set the name of the ExpressionAndCondition to use as an operand that is defined in the editor.
Definition: EventsFunction.h:130
const gd::String & GetGetterName() const
Get the name of the ExpressionAndCondition to use as an operand that is defined in the editor.
Definition: EventsFunction.h:124
bool IsPrivate() const
Returns true if the function is private.
Definition: EventsFunction.h:204
EventsFunction & SetSentence(const gd::String &sentence_)
Set the sentence of the function, to be used for the condition/action in the Events Editor.
Definition: EventsFunction.h:102
const gd::String & GetDescription() const
Get the description of the function, that is displayed in the editor.
Definition: EventsFunction.h:54
EventsFunction & SetFullName(const gd::String &fullName_)
Set the name of the function, to be displayed in the editor.
Definition: EventsFunction.h:87
Used as a base class for classes that will own events-backed functions.
Definition: EventsFunctionsContainer.h:27
A list of events.
Definition: EventsList.h:33
Class representing an expression used as a parameter of a gd::Instruction. This class is nothing more...
Definition: Expression.h:30
A container for objects groups.
Definition: ObjectGroupsContainer.h:29
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:50
A generic container that can represent a value ( containing a string, double, bool or int),...
Definition: SerializerElement.h:37
String represents an UTF8 encoded string.
Definition: String.h:31
Definition: CommonTools.h:24