6 #if defined(GD_IDE_ONLY)
7 #ifndef GDCORE_EVENTSFUNCTIONSCONTAINER_H
8 #define GDCORE_EVENTSFUNCTIONSCONTAINER_H
10 #include "GDCore/Project/EventsFunction.h"
11 #include "GDCore/String.h"
12 #include "GDCore/Tools/SerializableWithNameList.h"
14 class SerializerElement;
102 std::size_t position) {
103 return InsertNew(name, position);
106 std::size_t position) {
107 return Insert(
object, position);
109 void RemoveEventsFunction(
const gd::String& name) {
return Remove(name); }
110 void ClearEventsFunctions() {
return Clear(); }
111 void MoveEventsFunction(std::size_t oldIndex, std::size_t newIndex) {
112 return Move(oldIndex, newIndex);
115 return GetPosition(eventsFunction);
141 return SerializeElementsTo(
"eventsFunction", element);
149 return UnserializeElementsFrom(
"eventsFunction", project, element);
Base class used to represents a behavior that can be applied to an object. It stores the content (i....
Definition: Behavior.h:23
Events that can be generated as a stand-alone function, and used as a condition, action or expression...
Definition: EventsFunction.h:38
Used as a base class for classes that will own events-backed functions.
Definition: EventsFunctionsContainer.h:27
FunctionOwner GetOwner() const
Get the source of the function container.
Definition: EventsFunctionsContainer.h:42
std::size_t GetEventsFunctionsCount() const
Return the number of functions.
Definition: EventsFunctionsContainer.h:99
gd::EventsFunction & GetEventsFunction(const gd::String &name)
Get the function with the specified name.
Definition: EventsFunctionsContainer.h:62
void SerializeEventsFunctionsTo(SerializerElement &element) const
Serialize events functions.
Definition: EventsFunctionsContainer.h:140
std::vector< std::unique_ptr< gd::EventsFunction > > & GetInternalVector()
Provide a raw access to the vector containing the functions.
Definition: EventsFunctionsContainer.h:129
gd::EventsFunction & GetEventsFunction(std::size_t index)
Get the function at the specified index in the list.
Definition: EventsFunctionsContainer.h:82
const std::vector< std::unique_ptr< gd::EventsFunction > > & GetInternalVector() const
Provide a raw access to the vector containing the functions.
Definition: EventsFunctionsContainer.h:121
const gd::EventsFunction & GetEventsFunction(std::size_t index) const
Get the function at the specified index in the list.
Definition: EventsFunctionsContainer.h:92
bool HasEventsFunctionNamed(const gd::String &name) const
Check if the function with the specified name exists.
Definition: EventsFunctionsContainer.h:52
void UnserializeEventsFunctionsFrom(gd::Project &project, const SerializerElement &element)
Unserialize the events functions.
Definition: EventsFunctionsContainer.h:147
const gd::EventsFunction & GetEventsFunction(const gd::String &name) const
Get the function with the specified name.
Definition: EventsFunctionsContainer.h:72
void Init(const gd::EventsFunctionsContainer &other)
Definition: EventsFunctionsContainer.h:157
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
A class template that store a list of elements that can be accessed by their names and serialized.
Definition: SerializableWithNameList.h:33
void Init(const SerializableWithNameList< T > &other)
Definition: SerializableWithNameList.inl:190
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