|
arduino-audio-tools
|
Vector implementation which provides the most important methods as defined by std::vector. This class it is quite handy to have and most of the times quite better then dealing with raw c arrays. More...
#include <Vector.h>
Classes | |
| class | iterator |
| Iterator for the Vector class. More... | |
Public Member Functions | |
| Vector (Allocator &allocator) | |
| Constructor with only allocator. | |
| Vector (int size, T value, Allocator &allocator=DefaultAllocator) | |
| Allocate size and initialize array. | |
| Vector (size_t len=0, Allocator &allocator=DefaultAllocator) | |
| Default constructor: size 0 with DefaultAllocator: The len defines the capacity. | |
| Vector (T *from, T *to, Allocator &allocator=DefaultAllocator) | |
| legacy constructor with pointer range | |
| template<typename TT , int N> | |
| Vector (TT(&a)[N]) | |
| convert from c array | |
| Vector (Vector< T > &&moveFrom) | |
| Move constructor. | |
| Vector (Vector< T > ©From) | |
| copy constructor | |
| virtual | ~Vector () |
| Destructor. | |
| void | assign (iterator v1, iterator v2) |
| void | assign (size_t number, T value) |
| T & | back () |
| iterator | begin () |
| int | capacity () |
| void | clear () |
| bool | contains (T obj) |
| T * | data () |
| bool | empty () |
| iterator | end () |
| void | erase (int pos) |
| void | erase (iterator it) |
| int | indexOf (T obj) |
| operator bool () const | |
| Vector & | operator= (Vector &&moveFrom) |
| Move operator. | |
| Vector< T > & | operator= (Vector< T > ©From) |
| copy operator | |
| T & | operator[] (const int index) const |
| T & | operator[] (int index) |
| void | pop_back () |
| void | pop_front () |
| void | push_back (T &&value) |
| void | push_back (T &value) |
| void | push_front (T &&value) |
| void | push_front (T &value) |
| void | reset () |
| bool | resize (int newSize) |
| bool | resize (int newSize, T value) |
| void | setAllocator (Allocator &allocator) |
| void | shrink_to_fit () |
| int | size () |
| void | swap (T &other) |
| void | swap (Vector< T > &in) |
Protected Attributes | |
| int | bufferLen = 0 |
| int | len = 0 |
| Allocator * | p_allocator = &DefaultAllocator |
| T * | p_data = nullptr |
Vector implementation which provides the most important methods as defined by std::vector. This class it is quite handy to have and most of the times quite better then dealing with raw c arrays.