GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Public Member Functions | List of all members

Represents an object that is implemented with events. More...

#include <EventsBasedObject.h>

Inherits gd::AbstractEventsBasedEntity, and gd::ObjectsContainer.

Public Member Functions

 EventsBasedObject (const gd::EventsBasedObject &_eventBasedObject)
 
EventsBasedObjectClone () const
 Return a pointer to a new EventsBasedObject constructed from this one.
 
const gd::StringGetDefaultName () const
 Get the default name for created objects.
 
EventsBasedObjectSetDefaultName (const gd::String &defaultName_)
 Set the default name for created objects.
 
EventsBasedObjectSetDescription (const gd::String &description_) override
 Set the description of the behavior or object, to be displayed in the editor.
 
EventsBasedObjectSetName (const gd::String &name_)
 Set the internal name of the object.
 
EventsBasedObjectSetFullName (const gd::String &fullName_)
 Set the name of the object, to be displayed in the editor.
 
EventsBasedObjectMarkAsRenderedIn3D (bool isRenderedIn3D_)
 Declare a usage of the 3D renderer.
 
bool IsRenderedIn3D () const
 Return true if the object uses the 3D renderer.
 
EventsBasedObjectMarkAsAnimatable (bool isAnimatable_)
 Declare an Animatable capability.
 
bool IsAnimatable () const
 Return true if the object needs an Animatable capability.
 
EventsBasedObjectMarkAsTextContainer (bool isTextContainer_)
 Declare a TextContainer capability.
 
bool IsTextContainer () const
 Return true if the object needs a TextContainer capability.
 
void SerializeTo (SerializerElement &element) const override
 Serialize the AbstractEventsBasedEntity to the specified element.
 
void UnserializeFrom (gd::Project &project, const SerializerElement &element) override
 Load the AbstractEventsBasedEntity from the specified element.
 
- Public Member Functions inherited from gd::AbstractEventsBasedEntity
 AbstractEventsBasedEntity (const gd::String &_name, gd::EventsFunctionsContainer::FunctionOwner functionContainerSource)
 
AbstractEventsBasedEntityClone () const
 Return a pointer to a new AbstractEventsBasedEntity constructed from this one.
 
const gd::StringGetDescription () const
 Get the description of the behavior or object, that is displayed in the editor.
 
const gd::StringGetName () const
 Get the internal name of the behavior or object.
 
AbstractEventsBasedEntitySetName (const gd::String &name_)
 Set the internal name of the behavior or object.
 
const gd::StringGetFullName () const
 Get the name of the behavior or object, that is displayed in the editor.
 
AbstractEventsBasedEntitySetFullName (const gd::String &fullName_)
 Set the name of the behavior or object, to be displayed in the editor.
 
EventsFunctionsContainerGetEventsFunctions ()
 Return a reference to the functions of the events based behavior or object.
 
const EventsFunctionsContainerGetEventsFunctions () const
 Return a const reference to the functions of the events based behavior or object.
 
gd::PropertiesContainerGetPropertyDescriptors ()
 Return a reference to the list of the properties.
 
const gd::PropertiesContainerGetPropertyDescriptors () const
 Return a const reference to the list of the properties.
 
- Public Member Functions inherited from gd::ObjectsContainer
 ObjectsContainer ()
 Default constructor creating a container without any objects.
 
std::vector< const ObjectFolderOrObject * > GetAllObjectFolderOrObjects () const
 
gd::ObjectFolderOrObjectGetRootFolder ()
 
void AddMissingObjectsInRootFolder ()
 
bool HasObjectNamed (const gd::String &name) const
 Return true if object called name exists.
 
ObjectGetObject (const gd::String &name)
 Return a reference to the object called name.
 
const gd::ObjectGetObject (const gd::String &name) const
 Return a reference to the object called name.
 
ObjectGetObject (std::size_t index)
 Return a reference to the object at position index in the objects list.
 
const gd::ObjectGetObject (std::size_t index) const
 Return a reference to the object at position index in the objects list.
 
std::size_t GetObjectPosition (const gd::String &name) const
 Return the position of the object called name in the objects list. More...
 
std::size_t GetObjectsCount () const
 Return the number of object.
 
gd::ObjectInsertNewObject (const gd::Project &project, const gd::String &objectType, const gd::String &name, std::size_t position)
 Add a new empty object of type objectType called name at the specified position in the list.
More...
 
gd::ObjectInsertNewObjectInFolder (const gd::Project &project, const gd::String &objectType, const gd::String &name, gd::ObjectFolderOrObject &objectFolderOrObject, std::size_t position)
 Add a new empty object of type objectType called name in the given folder at the specified position.
More...
 
gd::ObjectInsertObject (const gd::Object &object, std::size_t position)
 Add a new object to the list. More...
 
void RemoveObject (const gd::String &name)
 Delete an object. More...
 
void MoveObject (std::size_t oldIndex, std::size_t newIndex)
 
void MoveObjectFolderOrObjectToAnotherContainerInFolder (gd::ObjectFolderOrObject &objectFolderOrObject, gd::ObjectsContainer &newContainer, gd::ObjectFolderOrObject &newParentFolder, std::size_t newPosition)
 
std::vector< std::unique_ptr< gd::Object > > & GetObjects ()
 
const std::vector< std::unique_ptr< gd::Object > > & GetObjects () const
 
void SerializeObjectsTo (SerializerElement &element) const
 Serialize the objects container.
 
void UnserializeObjectsFrom (gd::Project &project, const SerializerElement &element)
 Unserialize the objects container.
 
void SerializeFoldersTo (SerializerElement &element) const
 Serialize folder structure.
 
void UnserializeFoldersFrom (gd::Project &project, const SerializerElement &element)
 Unserialize folder structure.
 
ObjectGroupsContainerGetObjectGroups ()
 Return a reference to the project's objects groups.
 
const ObjectGroupsContainerGetObjectGroups () const
 Return a const reference to the project's objects groups.
 

Additional Inherited Members

- Static Public Member Functions inherited from gd::AbstractEventsBasedEntity
static gd::String GetPropertyActionName (const gd::String &propertyName)
 Get the name of the action to change a property.
 
static gd::String GetPropertyConditionName (const gd::String &propertyName)
 Get the name of the condition to compare a property.
 
static gd::String GetPropertyExpressionName (const gd::String &propertyName)
 Get the name of the expression to get a property.
 
static gd::String GetPropertyToggleActionName (const gd::String &propertyName)
 Get the name of the action to toggle a boolean property.
 
- Protected Attributes inherited from gd::ObjectsContainer
std::vector< std::unique_ptr< gd::Object > > initialObjects
 Objects contained.
 
gd::ObjectGroupsContainer objectGroups
 

Detailed Description

Represents an object that is implemented with events.

It's the responsibility of the IDE to run the logic to transform this into a real object, by declaring an extension and running code generation. See EventsFunctionsExtensionsLoader.


The documentation for this class was generated from the following files: