10 #include "GDCore/Events/EventsList.h"
11 #include "GDCore/Project/ObjectGroupsContainer.h"
12 #include "GDCore/Project/ParameterMetadataContainer.h"
13 #include "GDCore/String.h"
14 #include "GDCore/Extensions/Metadata/ValueTypeMetadata.h"
18 #include "GDCore/Extensions/Metadata/InstructionMetadata.h"
20 class SerializerElement;
22 class EventsFunctionsContainer;
59 description = description_;
102 sentence = sentence_;
133 getterName = getterName_;
141 expressionType = type;
159 ExpressionAndCondition,
160 ActionWithOperator };
179 return functionType == gd::EventsFunction::Action ||
180 functionType == gd::EventsFunction::ActionWithOperator;
189 return functionType == gd::EventsFunction::Expression ||
190 functionType == gd::EventsFunction::ExpressionAndCondition;
199 return functionType == gd::EventsFunction::Condition ||
200 functionType == gd::EventsFunction::ExpressionAndCondition;
212 isPrivate = _isPrivate;
251 isDeprecated = _isDeprecated;
266 deprecationMessage = message;
345 FunctionType functionType;
349 bool isPrivate =
false;
350 bool isAsync =
false;
352 bool isDeprecated =
false;
Events that can be generated as a stand-alone function, and used as a condition, action or expression...
Definition: EventsFunction.h:38
ParameterMetadataContainer & GetParameters()
Return the parameters.
Definition: EventsFunction.h:307
const gd::String & GetFullName() const
Get the name of the function, that is displayed in the editor.
Definition: EventsFunction.h:81
const ParameterMetadataContainer & GetParameters() const
Return the parameters of the function that are filled in the editor.
Definition: EventsFunction.h:300
EventsFunction & SetAsync(bool _isAsync)
Sets the asynchronicity of the function.
Definition: EventsFunction.h:224
const gd::String & GetDeprecationMessage() const
Get the deprecation message that explains why the function is deprecated and what to use instead.
Definition: EventsFunction.h:259
const gd::EventsList & GetEvents() const
Return the events.
Definition: EventsFunction.h:273
const gd::String & GetGroup() const
Get the group of the instruction in the editor.
Definition: EventsFunction.h:109
EventsFunction & SetFunctionType(FunctionType type)
Set the type of the function.
Definition: EventsFunction.h:165
EventsFunction & SetPrivate(bool _isPrivate)
Sets the privateness of the function.
Definition: EventsFunction.h:211
const gd::ValueTypeMetadata & GetExpressionType() const
Get the type of the expression.
Definition: EventsFunction.h:148
ObjectGroupsContainer & GetObjectGroups()
Return a reference to the object groups that can be used in the function.
Definition: EventsFunction.h:313
bool IsExpression() const
Return true if the function is an expression.
Definition: EventsFunction.h:188
bool IsAction() const
Return true if the function is an action.
Definition: EventsFunction.h:178
EventsFunction & SetDescription(const gd::String &description_)
Set the description of the function, to be displayed in the editor.
Definition: EventsFunction.h:58
EventsFunction & SetDeprecationMessage(const gd::String &message)
Set the deprecation message that explains why the function is deprecated and what to use instead.
Definition: EventsFunction.h:265
FunctionType GetFunctionType() const
Get the type of the function.
Definition: EventsFunction.h:173
gd::EventsList & GetEvents()
Return the events.
Definition: EventsFunction.h:278
gd::ValueTypeMetadata & GetExpressionType()
Get the type of the expression.
Definition: EventsFunction.h:153
EventsFunction * Clone() const
Return a pointer to a new EventsFunction constructed from this one.
Definition: EventsFunction.h:47
EventsFunction & SetName(const gd::String &name_)
Set the name of the function, to be used for the action/condition/expression name.
Definition: EventsFunction.h:73
EventsFunction & SetGroup(const gd::String &group_)
Set the group of the instruction in the editor.
Definition: EventsFunction.h:117
bool IsAsync() const
Returns true if the function is async.
Definition: EventsFunction.h:219
bool IsCondition() const
Return true if the function is a condition.
Definition: EventsFunction.h:198
const gd::String & GetHelpUrl() const
Get the help URL for this function.
Definition: EventsFunction.h:232
EventsFunction & SetDeprecated(bool _isDeprecated)
Sets whether the function is deprecated.
Definition: EventsFunction.h:250
EventsFunction & SetExpressionType(const gd::ValueTypeMetadata &type)
Set the type of the expression.
Definition: EventsFunction.h:140
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:95
EventsFunction & SetHelpUrl(const gd::String &helpUrl_)
Set the help URL for this function.
Definition: EventsFunction.h:237
const gd::String & GetName() const
Get the name of the function, to be used for the action/condition/expression name.
Definition: EventsFunction.h:67
bool IsDeprecated() const
Returns true if the function is deprecated.
Definition: EventsFunction.h:245
const ObjectGroupsContainer & GetObjectGroups() const
Return a const reference to the object groups that can be used in the function.
Definition: EventsFunction.h:319
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:132
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:126
bool IsPrivate() const
Returns true if the function is private.
Definition: EventsFunction.h:206
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:101
const gd::String & GetDescription() const
Get the description of the function, that is displayed in the editor.
Definition: EventsFunction.h:53
EventsFunction & SetFullName(const gd::String &fullName_)
Set the name of the function, to be displayed in the editor.
Definition: EventsFunction.h:86
Used as a base class for classes that will own events-backed functions.
Definition: EventsFunctionsContainer.h:27
A list of events.
Definition: EventsList.h:32
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:30
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:51
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:33
Definition: CommonTools.h:24