![]()  | 
  
    GDevelop Core
    
   Core library for developing platforms and tools compatible with GDevelop. 
   | 
 
Public Member Functions | |
| SPtrList (const SPtrList< T > &) | |
| SPtrList< T > & | operator= (const SPtrList< T > &rhs) | 
| T & | Insert (const T &element, size_t position=(size_t) -1) | 
| Insert the specified element to the list.  More... | |
| void | Insert (std::shared_ptr< T > element, size_t position=(size_t) -1) | 
| Insert the specified element to the list.  More... | |
| void | Insert (const SPtrList< T > &otherEvents, size_t begin, size_t end, size_t position=(size_t) -1) | 
| Copy elements from another list.  | |
| size_t | GetCount () const | 
| Return the number of elements.  | |
| std::shared_ptr< T > | GetSmartPtr (size_t index) | 
| Return the smart pointer to the element at position index in the elements list.  | |
| T & | Get (size_t index) | 
| Return a reference to the element at position index in the elements list.  | |
| const T & | Get (size_t index) const | 
| Return a reference to the element at position index in the elements list.  | |
| void | Remove (const T &element) | 
| Remove the specified element.  | |
| void | Remove (size_t index) | 
| Remove the element at the specified index in the list.  | |
| bool | IsEmpty () const | 
| Return true if there isn't any element in the list.  | |
| void | Clear () | 
| Clear the list of elements.  | |
Utilities  | |
Utility methods  | |
| bool | Contains (const T &elementToSearch) const | 
std::vector-like API  | |
These functions ensure that the class can be used just like a std::vector for iterations.  | |
| size_t | size () const | 
| Alias for GetCount()  More... | |
| bool | empty () const | 
| Alias for IsEmpty()  More... | |
| T & | operator[] (size_t index) | 
| Alias for Get()  More... | |
| const T & | operator[] (size_t index) const | 
| Alias for Get()  More... | |
| T & | at (size_t index) | 
| Alias for Get()  More... | |
| const T & | at (size_t index) const | 
| Alias for Get()  More... | |
Protected Member Functions | |
| void | Init (const SPtrList< T > &other) | 
Protected Attributes | |
| std::vector< std::shared_ptr< T > > | elements | 
      
  | 
  inline | 
Alias for Get()
      
  | 
  inline | 
Alias for Get()
| bool gd::SPtrList< T >::Contains | ( | const T & | elementToSearch | ) | const | 
Return true if the specified element exists in the list.
| element | The element to searched for | 
      
  | 
  inline | 
Alias for IsEmpty()
      
  | 
  protected | 
Initialize from another list of elements, copying elements. Used by copy-ctor and assign-op. Don't forget to update me if members were changed!
| T & gd::SPtrList< T >::Insert | ( | const T & | element, | 
| size_t | position = (size_t)-1  | 
        ||
| ) | 
Insert the specified element to the list.
| element | The element that must be copied and inserted into the list | 
| position | Insertion position. If the position is invalid, the object is inserted at the end of the objects list. | 
| void gd::SPtrList< T >::Insert | ( | std::shared_ptr< T > | element, | 
| size_t | position = (size_t)-1  | 
        ||
| ) | 
Insert the specified element to the list.
| element | The smart pointer to the element that must be inserted into the list | 
| position | Insertion position. If the position is invalid, the object is inserted at the end of the objects list. | 
      
  | 
  inline | 
Alias for Get()
      
  | 
  inline | 
Alias for Get()
      
  | 
  inline | 
Alias for GetCount()