template<typename T>
          List class
        
        | Template parameters | |
|---|---|
| T | the type of element to store | 
Contents
A simple double linked list
Public types
- using Iterator = ListIterator<T, Node>
- using CIterator = ListConstIterator<T, Node>
- using ReverseIterator = ListReverseIterator<T, Node>
- using CReverseIterator = ListConstReverseIterator<T, Node>
Constructors, destructors, conversion operators
Public functions
- auto operator=(List<T>&& other) -> List<T>& noexcept
- auto operator=(const List<T>& other) -> List<T>&
- void Add(const T& elem)
- void Add(T&& elem)
- void Insert(fsize pos, const T& elem)
- void Insert(fsize pos, T&& elem)
- void Insert(const Iterator& pos, const T& elem)
- void Insert(const Iterator& pos, T&& elem)
- auto operator[](fsize id) const -> const T&
- auto operator[](fsize id) -> T&
- auto operator+(const List<T>& other) const -> List<T>
- void operator+=(const List<T>& other)
- auto operator==(const List<T>& other) const -> bool noexcept
- auto operator!=(const List<T>& other) const -> bool noexcept
- void RemoveAt(fsize pos)
- void RemoveAt(Iterator& pos)
- void RemoveAt(Iterator&& pos)
- 
              template<template<typename> class Comparator = ops::void Remove(const T& elem, bool all = true)Equal> 
- auto FindByKey(fsize pos) -> Iterator
- 
              template<template<typename> class Comparator = ops::auto FindByValue(const T& val) -> IteratorEqual> 
- auto Find(const std::function<bool(const fsize pos, const T&val)>& comparator) -> Iterator
- void Swap(const Iterator& a, const Iterator& b)
- void RemoveLast()
- 
              template<template<typename> class Comparator = ops::void Sort(bool stable = false)Less> 
- auto First() -> T&
- auto Last() -> T&
- auto First() const -> const T&
- auto Last() const -> const T&
- auto Size() const -> fsize noexcept
- void Clear()
- auto begin() const -> CIterator
- auto end() const -> CIterator
- auto begin() -> Iterator
- auto end() -> Iterator
- auto rbegin() const -> CReverseIterator
- auto rend() const -> CReverseIterator
- auto rbegin() -> ReverseIterator
- auto rend() -> ReverseIterator
Function documentation
              
                template<typename T>
              
              void bpf::
            | Parameters | |
|---|---|
| elem | the element to add | 
Adds an item at the end of this list
              
                template<typename T>
              
              void bpf::
            | Parameters | |
|---|---|
| elem | the element to add | 
Adds an item at the end of this list
              
                template<typename T>
              
              const T& bpf::
            | Parameters | |
|---|---|
| id | the index of the element, in case of out of bounds, throws | 
| Returns | immutable item at index id | 
| Exceptions | |
| IndexException | if id is out of bounds | 
Returns an element const mode
              
                template<typename T>
              
              T& bpf::
            | Parameters | |
|---|---|
| id | the index of the element, in case of out of bounds, throws | 
| Returns | mutable item at index id | 
| Exceptions | |
| IndexException | if id is out of bounds | 
Returns an element non-const mode
              
                template<typename T>
              
              void bpf::
            | Parameters | |
|---|---|
| other | list to append | 
Appends the content of a list at the end of this list
              
                template<typename T>
              
              bool bpf::
            | Parameters | |
|---|---|
| other | List to compare with | 
| Returns | true if the two lists are equal, false otherwise | 
Compare List by performing a per-element check
              
                template<typename T>
              
              bool bpf::
            | Parameters | |
|---|---|
| other | ArrayList to compare with | 
| Returns | false if the two lists are equal, true otherwise | 
Compare List by performing a per-element check
              
                template<typename T>
                template<template<typename> class Comparator = ops::
            | Template parameters | |
|---|---|
| Comparator | the comparision operator to use for comparing values | 
| Parameters | |
| elem | the element to search for | 
| all | wether or not to remove all occurences or just the first one | 
Removes occurences of an element fron the list
              
                template<typename T>
                template<template<typename> class Comparator = ops::
            | Template parameters | |
|---|---|
| Comparator | comparision operator to use | 
| Parameters | |
| val | the value to search for | 
| Returns | iterator to the found item or end() if none | 
Locate an item by performing per-element check
              
                template<typename T>
              
              void bpf::
Removes the last item in this list
              
                template<typename T>
                template<template<typename> class Comparator = ops::
            | Template parameters | |
|---|---|
| Comparator | comparision operator | 
| Parameters | |
| stable | if true this function will apply a Merge-Sort algorithm, otherwise this function uses the Quick-Sort algorithm | 
Sorts this collection in place
              
                template<typename T>
              
              T& bpf::
            | Returns | mutable item | 
|---|---|
| Exceptions | |
| IndexException | if none | 
Returns the first element in this List
              
                template<typename T>
              
              T& bpf::
            | Returns | mutable item | 
|---|---|
| Exceptions | |
| IndexException | if none | 
Returns the last element in this List
              
                template<typename T>
              
              const T& bpf::
            | Returns | immutable item | 
|---|---|
| Exceptions | |
| IndexException | if none | 
Returns the first element in this List
              
                template<typename T>
              
              const T& bpf::
            | Returns | immutable item | 
|---|---|
| Exceptions | |
| IndexException | if none | 
Returns the last element in this List
              
                template<typename T>
              
              CReverseIterator bpf::
            | Returns | new iterator | 
|---|
Returns a reverse iterator to the begining of the collection
              
                template<typename T>
              
              CReverseIterator bpf::
            | Returns | new iterator | 
|---|
Returns a reverse iterator to the end of the collection
              
                template<typename T>
              
              ReverseIterator bpf::
            | Returns | new iterator | 
|---|
Returns a reverse iterator to the begining of the collection
              
                template<typename T>
              
              ReverseIterator bpf::
            | Returns | new iterator | 
|---|
Returns a reverse iterator to the end of the collection