osncore::AlfPtrVector Class Reference

class osncore::AlfPtrVector : public osncore::IDeleter

Use STL vectorTemplate class for a pointer vector

osncore.lib
Since
S60 5.0 Draft AlfPtrVector

Inherits from

Public Member Functions
AlfPtrVector ()
AlfPtrVector ( uint )
~AlfPtrVector ()
T * at (int)
bool autoDelete ()
void clear ()
uint count ()
T ** data ()
int findRef (T *)
bool insert ( uint , T *)
bool isEmpty ()
T * operator[] ( uint )
bool remove ( uint )
bool resize ( uint )
void setAutoDelete (bool)
uint size ()
Private Member Functions
AlfPtrVector (const AlfPtrVector &)
void deleteItem (void *)
AlfPtrVector & operator= (const AlfPtrVector &)
Private Attributes
bool mDelItem
AlfPtrVectorImpl mImpl

Constructor & Destructor Documentation

AlfPtrVector()

AlfPtrVector ( ) [inline]

Use STL vector Default constructor for vector. By default contents are automatically deleted when destructor is called.

Since
S60 5.0

AlfPtrVector(uint)

AlfPtrVector ( uint aSize ) [inline, explicit]

Use STL vector Constructor for vector with some default size. Size can be increased or decreased afterwards.

Since
S60 5.0

Parameters

uint aSize Default size of vector.

AlfPtrVector(const AlfPtrVector &)

AlfPtrVector ( const AlfPtrVector & ) [private]

Parameters

const AlfPtrVector &

~AlfPtrVector()

~AlfPtrVector ( ) [inline]

Use STL vector Destructor.

Member Functions Documentation

at(int)

T * at ( int aPos ) const [inline]

Use STL vector Returns pointer to the item at given position in the vector.

Since
S60 5.0

Parameters

int aPos Position from which item is queried.

autoDelete()

bool autoDelete ( ) [inline]

Use STL vector Returns the value of auto delete property.

Since
S60 5.0

clear()

void clear ( ) [inline]

Deletes all items of vector.

Since
S60 5.0

count()

uint count ( ) const [inline]

Use STL vector Returns number of items in vector.

Since
S60 5.0

data()

T ** data ( ) [inline]

Use STL vector Returns pointer to the raw data used by vector to stroe the items.

Since
S60 5.0

deleteItem(void *)

void deleteItem ( void * aItem ) [private, inline, virtual]

Parameters

void * aItem

findRef(T *)

int findRef ( T * aItem ) [inline]

Use STL vector Returns the position of the item in the vector.

Since
S60 5.0

Parameters

T * aItem Pointer to the item being searched in the vector.

insert(uint, T *)

bool insert ( uint aPos,
T * aItem
) [inline]

Use STL vector Inserts a new item at given position in the vector.

Since
S60 5.0

Parameters

uint aPos Position at which item has to be inserted.
T * aItem Pointer to the item to be inserted.

isEmpty()

bool isEmpty ( ) const [inline]

Use STL vector Checks if there are some items in vector.

Since
S60 5.0

operator=(const AlfPtrVector &)

AlfPtrVector & operator= ( const AlfPtrVector & ) [private]

Parameters

const AlfPtrVector &

operator[](uint)

T * operator[] ( uint aPos ) const [inline]

Use STL vector Returns the item at given index in the vector.

Since
S60 5.0

Parameters

uint aPos Position from which item has been queried.

remove(uint)

bool remove ( uint aPos ) [inline]

Use STL vector Removes the item from vector at given position. Item will be automatically deleted if auto delete property is set to true.

Since
S60 5.0

Parameters

uint aPos Position of the item to be removed.

resize(uint)

bool resize ( uint aSize ) [inline]

Use STL vector Resizes the vector to new size. Existing items in the vector will be restored if auto delete property is false.

Since
S60 5.0

Parameters

uint aSize New size in bytes.

setAutoDelete(bool)

void setAutoDelete ( bool aAutoDelete = true ) [inline]

Use STL vector Sets the auto delete property of vector.

Since
S60 5.0

Parameters

bool aAutoDelete = true Value(true/false) of the property.Default value is true.

size()

uint size ( ) const [inline]

Use STL vector Returns the size in bytes occupied by vector.

Since
S60 5.0

Member Data Documentation

bool mDelItem

bool mDelItem [private]

Auto delete

AlfPtrVectorImpl mImpl

AlfPtrVectorImpl mImpl [private]

Owned body