ScummVM API documentation
Sci::StablePointerDynamicArray< T, N > Class Template Reference

#include <lists32.h>

Inheritance diagram for Sci::StablePointerDynamicArray< T, N >:
Sci::DrawList

Public Types

typedef T ** iterator
 
typedef T *const * const_iterator
 
typedef T * value_type
 
typedef uint size_type
 

Public Member Functions

 StablePointerDynamicArray (const StablePointerDynamicArray &other)
 
 StablePointerDynamicArray (StablePointerDynamicArray &&other)
 
void operator= (StablePointerDynamicArray &other)
 
void operator= (StablePointerDynamicArray &&other)
 
T *const & operator[] (size_type index) const
 
T *& operator[] (size_type index)
 
void add (T *item)
 
iterator begin ()
 
const_iterator begin () const
 
void clear ()
 
iterator end ()
 
const_iterator end () const
 
void erase (T *item)
 
void erase (iterator &it)
 
void erase_at (size_type index)
 
size_type pack ()
 
size_type size () const
 

Detailed Description

template<class T, uint N>
class Sci::StablePointerDynamicArray< T, N >

StablePointerDynamicArray is like StablePointerArray above, except that it uses a Common::Array for storage instead of a fixed array. It is only used by DrawList, and was created upon discovering that LSL7 room 301 can overflow DrawList when displaying a large menu. Bug #14632

Member Function Documentation

◆ add()

template<class T , uint N>
void Sci::StablePointerDynamicArray< T, N >::add ( T *  item)
inline

Adds a new pointer to the array.

◆ erase() [1/2]

template<class T , uint N>
void Sci::StablePointerDynamicArray< T, N >::erase ( T *  item)
inline

Erases the object pointed to by the given iterator.

◆ erase() [2/2]

template<class T , uint N>
void Sci::StablePointerDynamicArray< T, N >::erase ( iterator &  it)
inline

Erases the object pointed to by the given iterator.

◆ erase_at()

template<class T , uint N>
void Sci::StablePointerDynamicArray< T, N >::erase_at ( size_type  index)
inline

Erases the object pointed to at the given index.

◆ pack()

template<class T , uint N>
size_type Sci::StablePointerDynamicArray< T, N >::pack ( )
inline

Removes freed pointers from the pointer list.

◆ size()

template<class T , uint N>
size_type Sci::StablePointerDynamicArray< T, N >::size ( ) const
inline

The number of populated slots in the array. The size of the array will only go down once pack is called.


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