Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
Vector< Element > Class Template Reference
Inheritance diagram for Vector< Element >:
Countable< Element >

Public Types

typedef int(* Comparer) (const Element &lhs, const Element &rhs)
 

Public Member Functions

 Vector (unsigned int initialCapacity=10, unsigned int capacityIncrement=10)
 
 Vector (const Vector &rhv)
 
unsigned int capacity () const
 
boolean contains (const Element &elem) const
 
const Element & firstElement () const
 
int indexOf (const Element &elem) const
 
boolean isEmpty () const
 
const Element & lastElement () const
 
int lastIndexOf (const Element &elem) const
 
unsigned int count () const
 
unsigned int size () const
 
void copyInto (Element *array) const
 
boolean add (const Element &obj)
 
void addElement (const Element &obj)
 
void addElement (Element *objp)
 
void clear ()
 
void ensureCapacity (unsigned int minCapacity)
 
void removeAllElements ()
 
boolean removeElement (const Element &obj)
 
void setSize (unsigned int newSize)
 
void trimToSize ()
 
const Element & elementAt (unsigned int index) const
 
void insertElementAt (const Element &obj, unsigned int index)
 
const void remove (unsigned int index)
 
void removeElementAt (unsigned int index)
 
void setElementAt (const Element &obj, unsigned int index)
 
const Element & get (unsigned int index) const
 
const Element & operator[] (unsigned int index) const
 
Element & operator[] (unsigned int index)
 
const Vector< Element > & operator= (const Vector< Element > &rhv)
 
const Vector< Element > & operator= (const Vector< Element > &&other)
 
void sort (Comparer compareFunction)
 
const Element & at (unsigned int i) const
 

Protected Member Functions

void copyFrom (const Vector &rhv)
 

Protected Attributes

unsigned int _size = 0
 
unsigned int _capacity = 0
 
unsigned int _increment
 
Element ** _data = nullptr