CLiwList Class Reference

class CLiwList : public CLiwContainer
Abstract interface for an ordered collection or sequence. Typically, the collection entries are of type TLiwVariant instances. CLiwList offers abstract methods to:
  • access elements based on an index

  • remove an element from the collection

  • append to an element to the collection

  • remove a key-value pair based on a key

  • get the total number of stored key-value pairs

A default concrete implementation is provided in the form of specialized class CLiwDefaultList

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Since container objects are reference counted, they cannot go with CleanupStack::PushL . The issue is solved by using CleanupClosePushL for pushing the container objects into the CleanupStack . Hence CLiwContainer::Close method is introduced common to all container objects.

This implies that the object of this concrete implementation class being created should be pushed into the CleanupStack using CLiwContainer::PushL .

ServiceHandler.lib

CLiwContainer CLiwContainer::Close CLiwContainer::PushL CLiwDefaultList

Inherits from

Member Functions Documentation

AppendL(const TLiwVariant &)

void AppendL ( const TLiwVariant & aEntry ) [pure virtual]

Appends an entry to the end of the collection. This is an abstract method.

CLiwDefaultList::AppendL

Parameters

const TLiwVariant & aEntry an Element to be added to the end of the collection

AtL(TInt, TLiwVariant &)

TBool AtL ( TInt aIndex,
TLiwVariant & aEntry
) const [pure virtual]

Gets an entry from the collection based on an integeral index.

!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT NOTE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

This is a copy of the value present in the list at the particular index. To ensure proper cleanup TLiwVariant::PushL method should be called beforehand.

CLiwDefaultList::AtL TLiwVariant::PushL

Parameters

TInt aIndex an index to get an entry from the collection
TLiwVariant & aEntry the returned element from the collection

Count()

TInt Count ( ) const [pure virtual]

Returns the number of elements present in the collection. This is an abstract method.

CLiwDefaultList::Count

Remove(TInt)

void Remove ( TInt aIndex ) [pure virtual]

Removes an element located at the passed index from the collection. This is an abstract method.

CLiwDefaultList::Remove

Parameters

TInt aIndex the index of the element to be removed from the collection

operator==(const CLiwList &)

IMPORT_C TBool operator== ( const CLiwList & aList ) const [virtual]

Equality operator implementation for collection container.

CLiwDefaultList::operator==

Parameters

const CLiwList & aList the list container to be compared