#include <common/suif_vector.h>
Class diagram for suif_vector:

Public Members | |
| typedef T | VectorType |
| typedef T | value_type |
| typedef T* | iterator |
| typedef const T* | const_iterator |
| suif_vector () | |
| suif_vector (unsigned n, const T& val = T()) | |
| Create a vector. More... | |
| suif_vector (const suif_vector<T>& vec) | |
| ~suif_vector () | |
| suif_vector<T>& | operator= (const suif_vector<T>& vec) |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| unsigned | length () const |
| return number of elements. | |
| unsigned | size () const |
| return number of elements. | |
| bool | empty () const |
| Is the vector empty. | |
| unsigned | capacity () const |
| Return available entries. | |
| void | insert (iterator pos, const T& x) |
| Insert a value at the given position. | |
| void | insert (int pos,const T& y) |
| Insert at the given position. | |
| iterator | erase (iterator pos) |
| Remove an element and return position of following (or end() ). | |
| void | erase (unsigned pos) |
| Remove entry in given position. | |
| void | push_back (const T& x) |
| void | pop_back () |
| T& | operator[] (unsigned n) |
| Index operator. | |
| const T& | operator[] (unsigned n) const |
| T& | at (unsigned n) const |
| T& | front () |
| T& | back () |
| const T& | front () const |
| const T& | back () const |
| bool | is_member (const T& x) const |
| Find an item in the list This forces items to have equality defined. More... | |
| void | clear (void) |
| Empty the list. | |
Protected Members | |
| void | allocate_vector (unsigned n) |
| void | vector_fill (iterator& start, unsigned n, const T& val) |
| iterator | copy (const_iterator start, const_iterator end, iterator dest) |
| const_iterator | reverse_copy (const_iterator start, const_iterator end, iterator dest) |
| void | insert_aux (iterator pos, const T& x) |
| T* | buff |
| iterator | m_start |
| iterator | m_finish |
| iterator | m_end_of_storage |
The intent is to support compilers which are unable to compile STL A vector is a list with a fast index operation but potentially slower insert and slower insert/erase at anywhere but end
Create a vector.
return number of elements.
return number of elements.
Is the vector empty.
Return available entries.
Insert a value at the given position.
Insert at the given position.
Remove an element and return position of following (or end() ).
Remove entry in given position.
Index operator.
Find an item in the list This forces items to have equality defined.
This should probably be removed
Empty the list.
[protected]
[protected]
[protected]
[protected]
[protected]
[protected]
[protected]
[protected]
[protected]
written by Dimitri van Heesch, © 1997-1999