Embedded Template Library  1.0
 All Classes Files Functions Variables Typedefs Friends Modules Pages
etl::vector_base Class Reference

#include <vector_base.h>

Public Types

typedef size_t size_type
 

Public Member Functions

size_type size () const
 
bool empty () const
 
bool full () const
 
size_type capacity () const
 
size_type max_size () const
 
size_t available () const
 
void clear ()
 Clears the vector.
 
void push_back ()
 
void pop_back ()
 

Protected Member Functions

 vector_base (size_t max_size)
 Constructor.
 

Protected Attributes

size_type current_size
 The current number of elements in the vector.
 
const size_type MAX_SIZE
 The maximum number of elements in the vector.
 

Detailed Description

The base class for all templated vector types.

Member Function Documentation

size_t etl::vector_base::available ( ) const
inline

Returns the remaining capacity.

Returns
The remaining capacity.
size_type etl::vector_base::capacity ( ) const
inline

Returns the capacity of the vector.

Returns
The capacity of the vector.
bool etl::vector_base::empty ( ) const
inline

Checks the 'empty' state of the vector.

Returns
true if empty.
bool etl::vector_base::full ( ) const
inline

Checks the 'full' state of the vector.

Returns
true if full.
size_type etl::vector_base::max_size ( ) const
inline

Returns the maximum possible size of the vector.

Returns
The maximum size of the vector.
void etl::vector_base::pop_back ( )
inline

Removes an element from the end of the vector. Does nothing if the vector is empty.

void etl::vector_base::push_back ( )
inline

Increases the size of the vector by one, but does not initialise the new element. If ETL_THROW_EXCEPTIONS is defined, throws a vector_full if the vector is already full.

size_type etl::vector_base::size ( ) const
inline

Gets the current size of the vector.

Returns
The current size of the vector.

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