Vector< T > Class Template Reference

`#include <Vector.h>`

Inheritance diagram for Vector< T >:

## Public Types

Iterator types.
typedef T * | iterator
typedef const T * | const_iterator

## Public Member Functions

| Vector (size_t wSize=0)
| Vector (Vector< T > &other)
| Vector (const Vector< T > &other)
| Vector (T *wData, T *wStart, T *wEnd)
| Vector (T *wStart, size_t span)
| Vector (const Vector< T > &other1, const Vector< T > &other2)
void | operator= (Vector< T > &other)
void | operator= (const Vector< T > &other)
Vector< T > | segment (size_t start, size_t span)
const Vector< T > | segment (size_t start, size_t span) const
Vector< T > | head (size_t span)
const Vector< T > | head (size_t span) const
Vector< T > | tail (size_t start)
const Vector< T > | tail (size_t start) const
Public Member Functions inherited from VectorBase< T >
size_t | size () const
size_t | bytes () const
void | resize (size_t newElements)
void | clear ()
void | clone (const VectorBase< T > &other)
void | vConcat (const VectorBase< T > &other1, const VectorBase< T > &other2)
| ~VectorBase ()
bool | isOwner ()
std::string | inspect () const
void | copyToSegment (VectorBase< T > &other, size_t start, size_t span) const
void | copyToSegment (VectorBase< T > &other, size_t start=0) const
void | copyTo (VectorBase< T > &other) const
void | segmentCopyTo (VectorBase< T > &other, size_t start, size_t span) const
void | fill (const T &val)
void | fill (const T &val, unsigned start, unsigned length)
void | operator= (const VectorBase< T > &other)
T & | operator[] (size_t index)
const T & | operator[] (size_t index) const
const T * | begin () const
T * | begin ()
const T * | end () const
T * | end ()
const T * | getData () const

## Additional Inherited Members

Protected Types inherited from VectorBase< T >
typedef T * | VectorDataType
Protected Member Functions inherited from VectorBase< T >
void | vInit (size_t elements)
void | shiftMem (VectorBase< T > &other)
void | makeAlias (const VectorBase< T > &other)
| VectorBase ()
| VectorBase (VectorDataType wData, T *wStart, T *wEnd)
Protected Attributes inherited from VectorBase< T >
VectorDataType | mData
| allocated data block.
T * | mStart
| start of useful data
T * | mEnd
| end of useful data + 1

## Member Typedef Documentation

## const_iterator

template<class T >

typedef const T* Vector< T >::const_iterator

## iterator

template<class T >

typedef T* Vector< T >::iterator

## Constructor & Destructor Documentation

## Vector() [1/6]

template<class T >

Vector< T >::Vector | ( | size_t | wSize = `0` | ) |

inline

Build an empty Vector of a given size.

References VectorBase< T >::resize().

## Vector() [2/6]

template<class T >

Vector< T >::Vector | ( | Vector< T > & | other | ) |

inline

Build a Vector by shifting the data block.

References VectorBase< T >::mData.

## Vector() [3/6]

template<class T >

Vector< T >::Vector | ( | const Vector< T > & | other | ) |

inline

Build a Vector by copying another.

References VectorBase< T >::clone().

## Vector() [4/6]

template<class T >

Vector< T >::Vector | ( | T * | wData,
|  | T * | wStart,
|  | T * | wEnd
| ) |  |

inline

Build a Vector with explicit values.

## Vector() [5/6]

template<class T >

Vector< T >::Vector | ( | T * | wStart,
|  | size_t | span
| ) |  |

inline

Build a vector from an existing block, NOT to be deleted upon destruction.

## Vector() [6/6]

template<class T >

Vector< T >::Vector | ( | const Vector< T > & | other1,
|  | const Vector< T > & | other2
| ) |  |

inline

Build a Vector by concatenation.

References VectorBase< T >::vConcat().

## Member Function Documentation

## head() [1/2]

template<class T >

Vector< T > Vector< T >::head | ( | size_t | span | ) |

inline

References Vector< T >::segment().

## head() [2/2]

template<class T >

const Vector< T > Vector< T >::head | ( | size_t | span | ) | const

inline

References Vector< T >::segment().

## operator=() [1/2]

template<class T >

void Vector< T >::operator= | ( | const Vector< T > & | other | ) |

inline

Assign from another Vector, copying.

References VectorBase< T >::clone().

## operator=() [2/2]

template<class T >

void Vector< T >::operator= | ( | Vector< T > & | other | ) |

inline

Assign from another Vector, shifting ownership.

References VectorBase< T >::shiftMem().

## segment() [1/2]

template<class T >

Vector< T > Vector< T >::segment | ( | size_t | start,
|  | size_t | span
| ) |  |

inline

Return an alias to a segment of this Vector.

References VectorBase< T >::mEnd.

Referenced by Vector< T >::head(), Vector< T >::head(), SoftVector::segment(), Vector< T >::tail(), and Vector< T >::tail().

## segment() [2/2]

template<class T >

const Vector< T > Vector< T >::segment | ( | size_t | start,
|  | size_t | span
| ) |  | const

inline

Return an alias to a segment of this Vector.

References VectorBase< T >::mEnd.

## tail() [1/2]

template<class T >

Vector< T > Vector< T >::tail | ( | size_t | start | ) |

inline

References Vector< T >::segment(), and VectorBase< T >::size().

## tail() [2/2]

template<class T >

const Vector< T > Vector< T >::tail | ( | size_t | start | ) | const

inline

References Vector< T >::segment(), and VectorBase< T >::size().

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

- Vector.h