ScummVM API documentation
AGS3::std::set< T, Comparitor > Class Template Reference

#include <set.h>

Inheritance diagram for AGS3::std::set< T, Comparitor >:
Common::SortedArray< T, const T &> Common::Array< T >

Classes

struct  Entry
 

Public Types

using iterator = typename Common::SortedArray< T, const T & >::iterator
 
using const_iterator = typename Common::SortedArray< T, const T & >::const_iterator
 
- Public Types inherited from Common::SortedArray< T, const T &>
typedef int(* Comparator) (const T &, const T &)
 
typedef T * iterator
 
typedef uint size_type
 
- Public Types inherited from Common::Array< T >
typedef T * iterator
 
typedef const T * const_iterator
 
typedef T value_type
 
typedef uint size_type
 

Public Member Functions

 set ()
 
iterator find (const T &item)
 
Entry insert (const T &item)
 
void erase (iterator item)
 
void erase (iterator first, iterator last)
 
size_t erase (const T &item)
 
size_t count (const T item) const
 
- Public Member Functions inherited from Common::SortedArray< T, const T &>
 SortedArray (Comparator comparator)
 
void insert (const T &element)
 
- Public Member Functions inherited from Common::Array< T >
 Array (size_type count)
 
 Array (size_type count, const T &value)
 
 Array (const Array< T > &array)
 
 Array (Array< T > &&old)
 
 Array (std::initializer_list< T > list)
 
template<class T2 >
 Array (const T2 *array, size_type n)
 
void push_back (const T &element)
 
void push_back (const Array< T > &array)
 
void pop_back ()
 
const T * data () const
 
T * data ()
 
T & front ()
 
const T & front () const
 
T & back ()
 
const T & back () const
 
void insert_at (size_type idx, const T &element)
 
void insert_at (size_type idx, const Array< T > &array)
 
void insert (iterator pos, const T &element)
 
remove_at (size_type idx)
 
T & operator[] (size_type idx)
 
const T & operator[] (size_type idx) const
 
Array< T > & operator= (const Array< T > &array)
 
Arrayoperator= (Array< T > &&old)
 
size_type size () const
 
void clear ()
 
iterator erase (iterator pos)
 
iterator erase (iterator first, iterator last)
 
bool empty () const
 
bool operator== (const Array< T > &other) const
 
bool operator!= (const Array< T > &other) const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
void reserve (size_type newCapacity)
 
void resize (size_type newSize)
 
void resize (size_type newSize, const T value)
 
void assign (const_iterator first, const_iterator last)
 
void swap (Array &arr)
 

Additional Inherited Members

- Protected Member Functions inherited from Common::Array< T >
void allocCapacity (size_type capacity)
 
void freeStorage (T *storage, const size_type elements)
 
iterator insert_aux (iterator pos, const_iterator first, const_iterator last)
 
- Static Protected Member Functions inherited from Common::Array< T >
static size_type roundUpCapacity (size_type capacity)
 
- Protected Attributes inherited from Common::Array< T >
size_type _capacity
 
size_type _size
 
T * _storage
 

Detailed Description

template<class T, class Comparitor = Common::Less<T>>
class AGS3::std::set< T, Comparitor >

Derives the ScummVM SortedArray to match the std::set class

Constructor & Destructor Documentation

◆ set()

template<class T, class Comparitor = Common::Less<T>>
AGS3::std::set< T, Comparitor >::set ( )
inline

Constructor

Member Function Documentation

◆ find()

template<class T, class Comparitor = Common::Less<T>>
iterator AGS3::std::set< T, Comparitor >::find ( const T &  item)
inline

Locate an item in the set

◆ insert()

template<class T, class Comparitor = Common::Less<T>>
Entry AGS3::std::set< T, Comparitor >::insert ( const T &  item)
inline

Insert an element at the sorted position.

◆ erase() [1/3]

template<class T, class Comparitor = Common::Less<T>>
void AGS3::std::set< T, Comparitor >::erase ( iterator  item)
inline

Removes the element at the given iterator

◆ erase() [2/3]

template<class T, class Comparitor = Common::Less<T>>
void AGS3::std::set< T, Comparitor >::erase ( iterator  first,
iterator  last 
)
inline

Removes the elements at the specified range

◆ erase() [3/3]

template<class T, class Comparitor = Common::Less<T>>
size_t AGS3::std::set< T, Comparitor >::erase ( const T &  item)
inline

Removes the elements equal to the given item. Returns the number of elements removed

◆ count()

template<class T, class Comparitor = Common::Less<T>>
size_t AGS3::std::set< T, Comparitor >::count ( const T  item) const
inline

Returns the number of keys that match the specified key


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