|
QSDK 1.1 Documentation |
#include <Q/vector.h>
Inheritance diagram for Utils::Vector< T >:

Public Member Functions | |
| Vector () | |
| Vector (const Vector< T > &v) | |
| Vector (size_t n) | |
| ~Vector () | |
| size_t | size () const |
| size_t | space () const |
| size_t | add (const T &e) |
| void | add (const Vector< T > &v) |
| bool | locateLast (const T &e, size_t &i) const |
| bool | intern (const T &e, size_t &i) |
| void | insert (const T &e, size_t i) |
| void | insert (const Vector< T > &v, size_t i) |
| bool | removeAt (size_t i) |
| bool | removeAt (size_t start, size_t end) |
| bool | remove (const T &e) |
| bool | remove (const Vector< T > &v) |
| bool | member (const T &t) const |
| void | empty () |
| void | clear () |
| int | compare (const Vector< T > &v) const |
| void | consume (Vector< T > &v) |
| void | subtract (const Vector< T > &v, Vector< T > &result) const |
| void | intersect (const Vector< T > &v, Vector< T > &result) const |
| Vector< T > & | operator+= (const Vector< T > &v) |
| Vector< T > & | operator-= (const Vector< T > &v) |
| int | operator== (const Vector< T > &v) const |
| const T & | first () const |
| const T & | last () const |
| void | at (size_t i, const T &t) |
| void | sizeTo (size_t n) |
| void | sizeToExact (size_t n) |
| void | spaceTo (size_t n) |
| Vector< T > & | operator= (const Vector< T > &v) |
| void | slice (size_t start, size_t end, Vector< T > &result) const |
| size_t | instanceSize () const |
| T & | operator[] (size_t i) |
| const T & | operator[] (size_t i) const |
| T & | at (size_t i) |
| const T & | at (size_t i) const |
| bool | locate (const T &e, size_t &i) const |
| bool | locateFirst (const T &e, size_t &i) const |
Protected Member Functions | |
| void | init () |
| void | size (size_t s) |
| void | resizeFor (size_t) |
| void | purge () |
| DECL_OPERATORS (T) | |
Protected Attributes | |
| size_t | space_ |
| T * | v_ |
T, equivalent methods can be defined: struct T { int operator==(const T&) const; T& operator=(const T&); };
|
|||||||||
|
Create a new empty vector. |
|
||||||||||
|
Create a copy of an existing vector. |
|
||||||||||
|
Create a new vector of size 0 with space allocated for
|
|
|||||||||
|
Destroy the vector. |
|
||||||||||
|
Append the contents of an existing vector, Reimplemented in Utils::OrderedVector< T, C >. |
|
||||||||||
|
Append a single element Reimplemented in Utils::OrderedVector< T, C >. |
|
||||||||||||||||
|
Set the |
|
||||||||||
|
Return a reference to the |
|
||||||||||
|
Return a reference to the |
|
|||||||||
|
Discard all elements from this vector, but keep the space constant. |
|
||||||||||
|
Return zero if this vector has the same value as the vector |
|
||||||||||
|
Move the underlying storage of vector |
|
|||||||||
|
Discard all elements from this vector, resetting the size to zero. |
|
|||||||||
|
Return a reference to the first element of the vector. |
|
||||||||||||||||
|
The contents of the vector |
|
||||||||||||||||
|
The element |
|
|||||||||
|
Return the amount of memory used by this vector in bytes. |
|
||||||||||||||||
|
If the element Reimplemented in Utils::OrderedVector< T, C >. |
|
||||||||||||||||
|
Calculate the set intersection of this vector with |
|
|||||||||
|
Return a reference to the last element of the vector. |
|
||||||||||||||||
|
Search for the first element in the vector that is equal to
Reimplemented in Utils::OrderedVector< T, C >. |
|
||||||||||||||||
|
Search for the first element in the vector that is equal to
Reimplemented in Utils::OrderedVector< T, C >. |
|
||||||||||||||||
|
Search for the last element in the vector equal to
Reimplemented in Utils::OrderedVector< T, C >. |
|
||||||||||
|
Return true if element
Reimplemented in Utils::OrderedVector< T, C >. |
|
||||||||||
|
Append the contents of the vector |
|
||||||||||
|
Remove any elements from vector |
|
||||||||||
|
Replace the contents of this vector with the vector |
|
||||||||||
|
Compare this vector with the vector |
|
||||||||||
|
Return a reference to the |
|
||||||||||
|
Return a reference to the |
|
||||||||||
|
Remove all elements which appear in vector |
|
||||||||||
|
Remove the first instance of element Reimplemented in Utils::OrderedVector< T, C >. |
|
||||||||||||||||
|
Remove all elements with index greater than or equal to Reimplemented in Utils::OrderedVector< T, C >. |
|
||||||||||
|
If Reimplemented in Utils::OrderedVector< T, C >. |
|
|||||||||
|
Return the current size of the vector. |
|
||||||||||
|
Set the current size of the vector to |
|
||||||||||
|
Set the current size of the vector to |
|
||||||||||||||||||||
|
First empty the vector |
|
|||||||||
|
Return the amount of space currently allocated for the vector (i.e. the number of elements that it could store before having to allocate more space). |
|
||||||||||
|
Allocate space for at least |
|
||||||||||||||||
|
Calculate the set subtraction of this vector with |
|
|
|
Qube Software Limited © 2000-2004
|
|