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_;
130 getterName = getterName_;
138 expressionType = type;
156 ExpressionAndCondition,
157 ActionWithOperator };
176 return functionType == gd::EventsFunction::Action ||
177 functionType == gd::EventsFunction::ActionWithOperator;
186 return functionType == gd::EventsFunction::Expression ||
187 functionType == gd::EventsFunction::ExpressionAndCondition;
196 return functionType == gd::EventsFunction::Condition ||
197 functionType == gd::EventsFunction::ExpressionAndCondition;
209 isPrivate = _isPrivate;
301 FunctionType functionType;
305 bool isPrivate =
false;
306 bool isAsync =
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:263
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:256
EventsFunction & SetAsync(bool _isAsync)
Sets the asynchronicity of the function.
Definition: EventsFunction.h:221
const gd::EventsList & GetEvents() const
Return the events.
Definition: EventsFunction.h:229
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:162
EventsFunction & SetPrivate(bool _isPrivate)
Sets the privateness of the function.
Definition: EventsFunction.h:208
const gd::ValueTypeMetadata & GetExpressionType() const
Get the type of the expression.
Definition: EventsFunction.h:145
ObjectGroupsContainer & GetObjectGroups()
Return a reference to the object groups that can be used in the function.
Definition: EventsFunction.h:269
bool IsExpression() const
Return true if the function is an expression.
Definition: EventsFunction.h:185
bool IsAction() const
Return true if the function is an action.
Definition: EventsFunction.h:175
EventsFunction & SetDescription(const gd::String &description_)
Set the description of the function, to be displayed in the editor.
Definition: EventsFunction.h:58
FunctionType GetFunctionType() const
Get the type of the function.
Definition: EventsFunction.h:170
gd::EventsList & GetEvents()
Return the events.
Definition: EventsFunction.h:234
gd::ValueTypeMetadata & GetExpressionType()
Get the type of the expression.
Definition: EventsFunction.h:150
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:114
bool IsAsync() const
Returns true if the function is async.
Definition: EventsFunction.h:216
bool IsCondition() const
Return true if the function is a condition.
Definition: EventsFunction.h:195
EventsFunction & SetExpressionType(const gd::ValueTypeMetadata &type)
Set the type of the expression.
Definition: EventsFunction.h:137
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
const gd::String & GetName() const
Get the name of the function, to be used for the action/condition/expression name.
Definition: EventsFunction.h:67
const ObjectGroupsContainer & GetObjectGroups() const
Return a const reference to the object groups that can be used in the function.
Definition: EventsFunction.h:275
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:129
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:123
bool IsPrivate() const
Returns true if the function is private.
Definition: EventsFunction.h:203
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:29
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