GNU Radio's GSM Package
|
#include <Vector.h>
Public Member Functions | |
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 |
Protected Types | |
typedef T * | VectorDataType |
Protected Member Functions | |
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 | |
VectorDataType | mData |
allocated data block. | |
T * | mStart |
start of useful data | |
T * | mEnd |
end of useful data + 1 | |
A simplified Vector template with aliases. Unlike std::vector, this class does not support dynamic resizing. Unlike std::vector, this class does support "aliases" and subvectors.
|
protected |
|
inlineprotected |
References mData, mEnd, and mStart.
Referenced by clone(), copyTo(), copyToSegment(), copyToSegment(), makeAlias(), operator=(), segmentCopyTo(), shiftMem(), vConcat(), Vector< T >::Vector(), Vector< T >::Vector(), Vector< T >::Vector(), Vector< T >::Vector(), and Vector< T >::Vector().
|
inlineprotected |
|
inline |
Destroy a Vector, deleting held memory.
References clear(), and VECTORDEBUG.
|
inline |
|
inline |
|
inline |
|
inline |
Release memory and clear pointers.
References resize().
Referenced by makeAlias(), shiftMem(), and ~VectorBase().
|
inline |
Copy data from another vector.
References bytes(), mData, mStart, resize(), size(), and VectorBase().
Referenced by BitVector::cloneSegment(), Vector< T >::operator=(), operator=(), and Vector< T >::Vector().
|
inline |
References copyToSegment(), size(), and VectorBase().
|
inline |
|
inline |
Copy all of this Vector to a segment of another Vector.
References copyToSegment(), size(), and VectorBase().
Referenced by copyToSegment().
|
inline |
|
inline |
Referenced by fill().
|
inline |
|
inline |
|
inline |
Referenced by BitVector::BitVector(), makeAlias(), operator=(), and VectorBase().
|
inline |
|
inline |
|
inlineprotected |
References clear(), getData(), mEnd, mStart, and VectorBase().
Referenced by operator=().
|
inline |
Assign from another Vector.
References clone(), getData(), makeAlias(), and VectorBase().
|
inline |
|
inline |
|
inline |
Change the size of the Vector in items (not bytes), discarding content.
References mData, VECTORDEBUG, and vInit().
Referenced by clear(), clone(), vConcat(), and Vector< T >::Vector().
|
inline |
Copy a segment of this vector into another.
other | The other vector (to copt into starting at 0.) |
start | The start point in this vector. |
span | The number of elements to copy. WARNING: This function does NOT resize the result - you must set the result size before entering. |
References mEnd, mStart, and VectorBase().
|
inlineprotected |
Assign from another Vector, shifting ownership.
References clear(), mData, mEnd, mStart, VectorBase(), and VECTORDEBUG.
Referenced by Vector< T >::operator=().
|
inline |
Return the size of the Vector in units, ie, the number of T elements.
References mData, mEnd, and mStart.
Referenced by bytes(), clone(), copyTo(), copyToSegment(), operator<<(), Vector< T >::tail(), Vector< T >::tail(), and vConcat().
|
inline |
References bytes(), mStart, resize(), size(), and VectorBase().
Referenced by Vector< T >::Vector().
|
inlineprotected |
|
protected |
allocated data block.
Referenced by clone(), inspect(), resize(), shiftMem(), size(), Vector< T >::Vector(), VectorBase(), VectorBase(), and vInit().
|
protected |
end of useful data + 1
Referenced by copyToSegment(), fill(), fill(), inspect(), makeAlias(), operator[](), operator[](), Vector< T >::segment(), Vector< T >::segment(), segmentCopyTo(), shiftMem(), size(), Vector< T >::Vector(), VectorBase(), VectorBase(), and vInit().
|
protected |
start of useful data
Referenced by clone(), copyToSegment(), BitVector::dup(), BitVector::dup(), fill(), fill(), inspect(), makeAlias(), operator[](), operator[](), segmentCopyTo(), shiftMem(), size(), vConcat(), Vector< T >::Vector(), VectorBase(), VectorBase(), and vInit().