GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Public Member Functions | List of all members
gd::PropertiesContainer Class Reference

A container of properties, used for custom behaviors, custom objects, extensions... More...

#include <PropertiesContainer.h>

Inherits gd::SerializableWithNameList< NamedPropertyDescriptor >.

Public Member Functions

 PropertiesContainer (EventsFunctionsContainer::FunctionOwner owner)
 
 PropertiesContainer (const PropertiesContainer &other)
 
PropertiesContaineroperator= (const PropertiesContainer &other)
 
void ForEachPropertyMatchingSearch (const gd::String &search, std::function< void(const gd::NamedPropertyDescriptor &property)> fn) const
 
EventsFunctionsContainer::FunctionOwner GetOwner () const
 
- Public Member Functions inherited from gd::SerializableWithNameList< NamedPropertyDescriptor >
 SerializableWithNameList (const SerializableWithNameList< NamedPropertyDescriptor > &)
 
SerializableWithNameList< NamedPropertyDescriptor > & operator= (const SerializableWithNameList< NamedPropertyDescriptor > &rhs)
 
NamedPropertyDescriptorInsert (const NamedPropertyDescriptor &element, size_t position=(size_t) -1)
 Insert the specified element to the list. More...
 
void Insert (const SerializableWithNameList< NamedPropertyDescriptor > &otherEvents, size_t begin, size_t end, size_t position=(size_t) -1)
 Copy elements from another list.
 
NamedPropertyDescriptorInsertNew (const gd::String &name, size_t position=(size_t) -1)
 Insert a new element (constructed from its default constructor) with the given name. More...
 
size_t GetCount () const
 Return the number of elements.
 
NamedPropertyDescriptorGet (const gd::String &name)
 Return a reference to the element with the specified name.
 
const NamedPropertyDescriptorGet (const gd::String &name) const
 Return a reference to the element with the specified name.
 
NamedPropertyDescriptorGet (size_t index)
 Return a reference to the element at position index in the elements list.
 
const NamedPropertyDescriptorGet (size_t index) const
 Return a reference to the element at position index in the elements list.
 
void Remove (const gd::String &name)
 Remove the element with the specified name, destroying it.
 
void Remove (size_t index)
 Remove the element at the specified index in the list, destroying it.
 
bool IsEmpty () const
 Return true if there isn't any element in the list.
 
void Clear ()
 Clear the list of elements, destroying all of them.
 
void Move (std::size_t oldIndex, std::size_t newIndex)
 Move element at position oldIndex to position newIndex. More...
 
bool Has (const gd::String &name) const
 Return true if an element with the specified name exists.
 
std::size_t GetPosition (const NamedPropertyDescriptor &element) const
 Get the position of an element in the list.
 
size_t size () const
 Alias for GetCount() More...
 
bool empty () const
 Alias for IsEmpty() More...
 
NamedPropertyDescriptoroperator[] (size_t index)
 Alias for Get() More...
 
const NamedPropertyDescriptoroperator[] (size_t index) const
 Alias for Get() More...
 
NamedPropertyDescriptorat (size_t index)
 Alias for Get() More...
 
const NamedPropertyDescriptorat (size_t index) const
 Alias for Get() More...
 
const std::vector< std::unique_ptr< NamedPropertyDescriptor > > & GetInternalVector () const
 Provide a raw access to the vector containing the elements.
 
std::vector< std::unique_ptr< NamedPropertyDescriptor > > & GetInternalVector ()
 Provide a raw access to the vector containing the elements.
 
void SerializeElementsTo (const gd::String &elementName, SerializerElement &element) const
 
void UnserializeElementsFrom (const gd::String &elementName, gd::Project &project, const SerializerElement &element)
 
void UnserializeElementsFrom (const gd::String &elementName, const SerializerElement &element)
 
void ProgressivelyUnserializeElementsFrom (const gd::String &elementName, gd::Project &project, const SerializerElement &element)
 

Additional Inherited Members

- Protected Member Functions inherited from gd::SerializableWithNameList< NamedPropertyDescriptor >
void Init (const SerializableWithNameList< NamedPropertyDescriptor > &other)
 
- Protected Attributes inherited from gd::SerializableWithNameList< NamedPropertyDescriptor >
std::vector< std::unique_ptr< NamedPropertyDescriptor > > elements
 

Detailed Description

A container of properties, used for custom behaviors, custom objects, extensions...

See also
gd::NamedPropertyDescriptor

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