Home You are here: Home > Support > Reference v1.0

Change language: German

TXmVector Class Template Reference

Inheritance diagram for TXmVector:

TXmObjectVector TXmObjectVectorObject List of all members.

Detailed Description

template<class C>
class exom::TXmVector< C >

Template to create a vector based type safe container for classes or simple data types.


Public Member Functions

int GetSize () const
 Return the number of items.
int GetCapacity () const
 Return the number of items reserved by the container.
void SetGrowOnly (bool flag)
 Enable/disable the possibility to reduced its capacity.
bool GetGrowOnly () const
 Return true, if vector can't reduced its capacity.
C & GetBack (int offset=1) const
 Return the element with given offset (1= last element) from the end.
C * GetList () const
 Return the pointer to the first element.
C & At (int pos) const
 Return the element at the given position.
C & operator[] (int pos) const
 Return the element at the given position.
 TXmVector ()
 Consturct a vector with zero elements.
 TXmVector (const TXmVector &a)
 Consturct a vector copying the elements from the given vector.
TXmVectoroperator= (const TXmVector &a)
 Copy the elements from the given vector.
void Reserve (int abs)
 Reserve additional memory for the vector, if the current Capaticy if lower, otherwise it do nothing.
void ClearList ()
 Delete all elements of the vector.
void SetSize (int iSize)
 Set the size of items of the vector, without copying any containing items.
void Resize (int iSize)
 Set the size of items by adding or removing items at the end of the vector.
void AddSize (int iNum, int growSize)
 Change the size by adding the specified number of items.
void DeleteAt (int pos)
 Delete the element at the given position.
C & Insert (int pos)
 Insert an element at the given position.
int Insert (const C &newItem, int pos)
 Insert the given element at the specified position.
void AppendArray (const TXmVector &a)
 Append the items of the given vector.
C & PushBack ()
 Put an uninitialized element to the tail of the vector.
void PushBack (const C &newItem)
 Put the given element to the tail of the vector.
void PopBack ()
 Remove an element form the tail of the vector, without a check, if the vector is empty.
void swap (TXmVector &a)
 Swap the items of two vectors in constant time.

Copyright © 2006 Praetz Software Development - www.exomware.com