![]() |
GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Used as a base class for classes that will own events-backed functions. More...
#include <EventsFunctionsContainer.h>
Inherits gd::SerializableWithNameList< gd::EventsFunction >.
Public Types | |
| enum | FunctionOwner { Extension , Object , Behavior } |
Public Member Functions | |
| EventsFunctionsContainer (FunctionOwner source_) | |
| EventsFunctionsContainer (const EventsFunctionsContainer &other) | |
| EventsFunctionsContainer & | operator= (const EventsFunctionsContainer &other) |
| FunctionOwner | GetOwner () const |
| Get the source of the function container. More... | |
Events Functions management | |
| bool | HasEventsFunctionNamed (const gd::String &name) const |
| Check if the function with the specified name exists. | |
| gd::EventsFunction & | GetEventsFunction (const gd::String &name) |
| Get the function with the specified name. More... | |
| const gd::EventsFunction & | GetEventsFunction (const gd::String &name) const |
| Get the function with the specified name. More... | |
| gd::EventsFunction & | GetEventsFunction (std::size_t index) |
| Get the function at the specified index in the list. More... | |
| const gd::EventsFunction & | GetEventsFunction (std::size_t index) const |
| Get the function at the specified index in the list. More... | |
| std::size_t | GetEventsFunctionsCount () const |
| Return the number of functions. | |
| gd::EventsFunction & | InsertNewEventsFunction (const gd::String &name, std::size_t position) |
| gd::EventsFunction & | InsertEventsFunction (const gd::EventsFunction &eventFunction, std::size_t position) |
| void | RemoveEventsFunction (const gd::String &name) |
| void | ClearEventsFunctions () |
| void | MoveEventsFunction (std::size_t oldIndex, std::size_t newIndex) |
| std::size_t | GetEventsFunctionPosition (const gd::EventsFunction &eventsFunction) |
| const std::vector< std::unique_ptr< gd::EventsFunction > > & | GetInternalVector () const |
| Provide a raw access to the vector containing the functions. | |
| std::vector< std::unique_ptr< gd::EventsFunction > > & | GetInternalVector () |
| Provide a raw access to the vector containing the functions. | |
Folders management | |
| gd::EventsFunction & | InsertNewEventsFunctionInFolder (const gd::String &name, gd::FunctionFolderOrFunction &functionFolderOrFunction, std::size_t position) |
| Add a new empty function called name in the given folder at the specified position. More... | |
| std::vector< const FunctionFolderOrFunction * > | GetAllFunctionFolderOrFunction () const |
| gd::FunctionFolderOrFunction & | GetRootFolder () |
| void | AddMissingFunctionsInRootFolder () |
| void | SerializeFoldersTo (SerializerElement &element) const |
| Serialize folder structure. | |
| void | UnserializeFoldersFrom (const SerializerElement &element) |
| Unserialize folder structure. | |
Serialization | |
| void | SerializeEventsFunctionsTo (SerializerElement &element) const |
| Serialize events functions. | |
| void | UnserializeEventsFunctionsFrom (gd::Project &project, const SerializerElement &element) |
| Unserialize the events functions. | |
Protected Member Functions | |
| void | Init (const gd::EventsFunctionsContainer &other) |
Used as a base class for classes that will own events-backed functions.
| std::vector< const FunctionFolderOrFunction * > gd::EventsFunctionsContainer::GetAllFunctionFolderOrFunction | ( | ) | const |
Returns a vector containing all object and folders in this container. Only use this for checking if you hold a valid FunctionFolderOrFunction - don't use this for rendering or anything else.
|
inline |
Get the function with the specified name.
|
inline |
Get the function with the specified name.
|
inline |
Get the function at the specified index in the list.
|
inline |
Get the function at the specified index in the list.
|
inline |
Get the source of the function container.
|
inlineprotected |
Initialize object using another object. Used by copy-ctor and assign-op. Don't forget to update me if members were changed!
| gd::EventsFunction & gd::EventsFunctionsContainer::InsertNewEventsFunctionInFolder | ( | const gd::String & | name, |
| gd::FunctionFolderOrFunction & | functionFolderOrFunction, | ||
| std::size_t | position | ||
| ) |
Add a new empty function called name in the given folder at the specified position.