Arduino Posix Filesystems
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
file_systems::Vector< T > Class Template Reference

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 (size_t len=20)
 default constructor
 
 Vector (int size, T value)
 allocate size and initialize array
 
 Vector (Vector< T > &&moveFrom)=default
 
 Vector (Vector< T > &copyFrom)
 copy constructor
 
 Vector (T *from, T *to)
 legacy constructor with pointer range
 
 ~Vector ()
 Destructor.
 
void clear ()
 
int size ()
 
bool empty ()
 
void push_back (T value)
 
void push_front (T value)
 
void pop_back ()
 
void pop_front ()
 
void assign (iterator v1, iterator v2)
 
void assign (size_t number, T value)
 
void swap (Vector< T > &in)
 
T & operator[] (int index)
 
Vector< T > & operator= (Vector< T > &copyFrom)
 
T & operator[] (const int index) const
 
bool resize (int newSize, T value)
 
void shrink_to_fit ()
 
int capacity ()
 
bool resize (int newSize)
 
iterator begin ()
 
T & back ()
 
iterator end ()
 
void erase (iterator it)
 
T * data ()
 

Protected Member Functions

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

Protected Attributes

int bufferLen =0
 
int len = 0
 
T * p_data = nullptr
 

Detailed Description

template<class T>
class file_systems::Vector< T >

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.

Author
Phil Schatzmann

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