class Vector

Templated Vector class A Vector is a pair of Segments, one (Vector's parent) delineates the active subrange of the second, (called allocation) allocation is a TupleBase array allocated by QVMM, it encloses the active subrange More...

Definition#include <Vector.hh>
Template formVector<class T>
InheritsSegment<T>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Members

Protected Members


Detailed Description

Templated Vector class A Vector is a pair of Segments, one (Vector's parent) delineates the active subrange of the second, (called allocation) allocation is a TupleBase array allocated by QVMM, it encloses the active subrange

unsigned int extra_allocation

a extra proportion of allocation (3 == 133%)

unsigned int minimum_occupancy

minimum proportional occupancy before shrinking

unsigned int minimum_size

the minimum size of an allocation in bytes

int actual_allocation (int newlen)
[static]

calculate an allocation based on the above parameters

>
friend ostream& operator<< <T> (ostream& out, const Vector<T> & vec)
[protected]

dump Vector to file

TupleBase<T> * allocation
[protected]

the allocated space for this Vector

TupleBase<T> * Allocation ()
[protected const]

accessor for @see allocation

void rlloc (int newlen)
[protected]

reallocate Tuple create a new allocation of actual_allocation(len) size

Parameters:
newlennew length Vector allocation

void resize (int newlen)
[protected]

realloc Tuple to accomodate new growth

ensure Vector has at least len elements, reallocating as needed

Parameters:
newlennew length Vector allocation

void shrink ()
[protected]

reallocate Tuple if shrunk below minimum utilization reduce an allocation if it's fallen below the low-water-mark defined for this Vector type

Vector ()

Null Vector constructor

Vector (int size)

construct with pre-allocation

~Vector ()
[virtual]

destructor - does nothing

void destroy (int len = 1)

destroy contents

void check (int i = 1)
[const]

consistency check

T & operator[] (int offset)

Segment array accessor

Segment<T>::operator bool

hoist @see Segment boolean cast

Vector (const T *contentT, int size)

Copy T* array of a given size

Vector (const Segment<T> &contentT)

Copy Segment

Vector (const T &contentT)

Make singleton T& Vector

Vector (const T &contentT, int repetition)

Repeat T& as array

Vector (TupleBase<T> *t)

Reference Tuple

Vector (TupleBase<T> &t)

Reference Tuple

Vector (TupleBase<T> *t, int _start, int _len=-1)

Reference SubTuple

Parameters:
_startstart of subrange
_lenlength of subrange

Vector (TupleBase<T> &t, int _start, int _len=-1)

Reference SubTuple

Parameters:
_startstart of subrange
_lenlength of subrange

Vector (const Vector<T> *v)

Reference Vector<T>*

Vector (const Vector<T> &v)

Reference Vector<T>&

Vector (const Vector<T> *v, int _start, int _len=-1)

Reference subrange Vector<T>*

Parameters:
_startstart of subrange
_lenlength of subrange

Vector (const Vector<T> &v, int _start, int _len=-1)

Reference subrange Vector<T>&

Parameters:
_startstart of subrange
_lenlength of subrange

Vector (const Vector<T> *v1, const Vector<T> *v2)

union: v1 + v2

Vector (const Vector<T> &v1, const Vector<T> &v2)

union: v1 + v2

Vector<T> * del (int where = 0, int what=-1)

mutator - remove range from Vector

Vector<T> * vconcat (const T *addT, int additional)

mutator - append values to right

Vector<T> * vconcat (const T *addT)

mutator - append values to right

Vector<T> * vconcat (const T &addT)

mutator - append values to right

Vector<T> * vconcat (const Segment<T> *addT)

mutator - append values to right

Vector<T> * vconcat (const Segment<T> &addT)

mutator - append values to right

Vector<T> * vconcat (int count, ...)

mutator - append values to right

Vector<T> * vinsert (int where, const T *addT, int what)

mutator - insert values before point

Vector<T> * vinsert (int where, const T *addT)

mutator - insert values before point

Vector<T> * vinsert (int where, const Segment<T> *addT)

mutator - insert values before point

Vector<T> * vinsert (int where, const Segment<T> &addT)

mutator - insert values before point

Vector<T> * Replace (int where, int what, const T *addT, int additional)

mutator - replace range with array

Vector<T> * Replace (int where, int what, const T *addT)

mutator - replace range with array

Vector<T> * Replace (int where, int what, const Segment<T> *addT)

mutator - replace range with array

Vector<T> * Replace (int where, int what, const Vector<T> &addT)

mutator - replace range with array

bool set_add (const T &d)

add an element to the set, true if added

bool set_remove (const T &d)

delete an element from the set, true if deleted

void toset ()

convert Vector to set


Generated by: colin@sharedtech.dhis.org on Sat Nov 6 11:59:24 199.