Pico-Arduino
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pico_arduino::Vector< T > Class Template Reference

Vector implementation which provides the most important methods as defined by std::vector. This is neither part of Pico nor of the Arduino framwork but nevertheless 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 (int len=20)
 
 Vector (int size, T value)
 
 Vector (T *from, T *to)
 
 Vector (Vector< T > &copyFrom)
 
void assign (iterator v1, iterator v2)
 
void assign (size_t number, T value)
 
T & back ()
 
iterator begin ()
 
int capacity ()
 
void clear ()
 
bool empty ()
 
iterator end ()
 
void erase (iterator it)
 
Vector< T > & operator= (Vector< T > &copyFrom)
 
T & operator[] (const int index) const
 
T & operator[] (int index)
 
void pop_back ()
 
void push_back (T value)
 
bool resize (int newSize)
 
bool resize (int newSize, T value)
 
void shrink_to_fit ()
 
int size ()
 
void swap (Vector< T > &in)
 

Protected Member Functions

void cleanup (T *data, int from, int to)
 
void resize_internal (int newSize, bool copy, bool shrink=false)
 

Protected Attributes

int bufferLen
 
T * data = nullptr
 
int len = 0
 

Detailed Description

template<class T>
class pico_arduino::Vector< T >

Vector implementation which provides the most important methods as defined by std::vector. This is neither part of Pico nor of the Arduino framwork but nevertheless it is quite handy to have and most of the times quite better then dealing with raw c arrays.

Author
Phil Schatzmann

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