Alf::AlfContainer Class Reference

class Alf::AlfContainer : public Alf::IAlfContainer

Inherits from

Public Member Functions
AlfContainer()
~AlfContainer()
OSN_IMPORT voidaddItem(IAlfVariantType *)
OSN_IMPORT voidaddItem(uint, IAlfVariantType *)
OSN_IMPORT boolboolean()
OSN_IMPORT IAlfBranch *branch()
OSN_IMPORT voidclear()
OSN_IMPORT IAlfContainer *clone()
OSN_IMPORT IAlfContainer *container()
OSN_IMPORT intcount()
OSN_IMPORT IAlfModelBase *customData()
OSN_IMPORT intinteger()
OSN_IMPORT IAlfVariantType *item(uint)
OSN_IMPORT IAlfMap *map()
OSN_IMPORT booloperator==(const IAlfVariantType &)
OSN_IMPORT doublereal()
OSN_IMPORT voidremoveItem(uint)
OSN_IMPORT voidreplaceItem(uint, IAlfVariantType *)
OSN_IMPORT voidset(IAlfVariantType &)
OSN_IMPORT voidsort(const IAlfSortFunction &)
OSN_IMPORT const UString &string()
OSN_IMPORT IAlfVariantType::Typetype()
OSN_IMPORT uintuinteger()
Private Member Functions
voidconstruct()
Inherited Functions
Alf::IAlfContainer::~IAlfContainer()
Alf::IAlfVariantType::~IAlfVariantType()
Inherited Enumerations
Alf::IAlfVariantType:Type
Private Attributes
auto_ptr< AlfContainerDataImpl >mContainerData

Constructor & Destructor Documentation

AlfContainer()

OSN_IMPORTAlfContainer()
Constructor for creating a variant data type which can store a alfcontainer
Exceptions
std::bad_alloc

Since
S60 ?S60_version

~AlfContainer()

OSN_IMPORT~AlfContainer()
Destructor
Since
S60 ?S60_version

Member Functions Documentation

addItem(IAlfVariantType *)

OSN_IMPORT voidaddItem(IAlfVariantType *aData)[virtual]
Adds a variantData item into the container .From IAlfContainer interface variant data to be added into the container. Ownership is transferred if the method completes without exceptions. If there is an exception (e.g. due to out of memory), the client code is responsible for cleaning up the object.
Exceptions
std::bad_alloc

Since
S60 ?S60_version

Parameters

IAlfVariantType * aData

addItem(uint, IAlfVariantType *)

OSN_IMPORT voidaddItem(uintaIndex,
IAlfVariantType *aData
)[virtual]
Adds a variantData item into the container .From IAlfContainer interface index where the data is added variant data to be added into the container. Ownership is transferred if the method completes without exceptions. If there is an exception (e.g. due to out of memory), the client code is responsible for cleaning up the object.
Exceptions
std::bad_alloc

Since
S60 ?S60_version

Parameters

uint aIndex
IAlfVariantType * aData

boolean()

OSN_IMPORT boolboolean()const [virtual]
Get the data value as an bool .From IAlfVariantType Interface. Always throws an exception.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType always since AlfContainer is not boolean.

Since
S60 ?S60_version

branch()

OSN_IMPORT IAlfBranch *branch()[virtual]
Get the data value as Branch .From IAlfVariantType Interface. Always throws an exception.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType always since AlfContainer is not a map.

Since
S60 ?S60_version

clear()

OSN_IMPORT voidclear()[virtual]

Clear the Container. From IAlfContainer interface

Since
S60 ?S60_version

clone()

OSN_IMPORT IAlfContainer *clone()[virtual]
Clones the entire container From IAlfContainer interface
Exceptions
std::bad_alloc

osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType if there is an invalid data type in the container.

Since
S60 ?S60_version

construct()

voidconstruct()[private]

container()

OSN_IMPORT IAlfContainer *container()[virtual]

Get the data value as an Conatiner .From IAlfVariantType Interface.

Since
S60 ?S60_version

count()

OSN_IMPORT intcount()[virtual]

Gets the Number of items in the container . From IAlfContainer interface

Since
S60 ?S60_version

customData()

OSN_IMPORT IAlfModelBase *customData()[virtual]
Get the data value as a User Defined Data Pointer. Always throws an exception.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType always since AlfContainer is not a custom data type.

Since
S60 ?S60_version

integer()

OSN_IMPORT intinteger()const [virtual]
Get the data value as an Integer .From IAlfVariantType Interface. Always throws an exception.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType always since AlfContainer is not an integer.

Since
S60 ?S60_version

item(uint)

OSN_IMPORT IAlfVariantType *item(uintaIndex)[virtual]
Gets the Item at a given index in the container From IAlfContainer interface
Since
S60 ?S60_version

Parameters

uint aIndex- index at which the element is required

map()

OSN_IMPORT IAlfMap *map()[virtual]
Get the data value as Map .From IAlfVariantType Interface. Always throws an exception.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType always since AlfContainer is not a map.

Since
S60 ?S60_version

operator==(const IAlfVariantType &)

OSN_IMPORT booloperator==(const IAlfVariantType &aOther)const
Equality comparison operator. Always throws an exception.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidContainerOperation always.

Since
S60 ?S60_version

Parameters

const IAlfVariantType & aOtherobject to compare against.

real()

OSN_IMPORT doublereal()const [virtual]
Get the data value as an bool .From IAlfVariantType Interface. Always throws an exception.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType always since AlfContainer is not a real value.

Since
S60 ?S60_version

removeItem(uint)

OSN_IMPORT voidremoveItem(uintaIndex)[virtual]
Removes an item from given index in the container. From IAlfContainer interface
Since
S60 ?S60_version

Parameters

uint aIndex- index at which the element is to be removed.

replaceItem(uint, IAlfVariantType *)

OSN_IMPORT voidreplaceItem(uintaIndex,
IAlfVariantType *aNewData
)[virtual]
Replace an item from given index in the container.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidContainerOperation if the replaceItem fails.

Since
S60 ?S60_version

Parameters

uint aIndex- index at which the element is to be replaced
IAlfVariantType * aNewData- new Data to be replaced

set(IAlfVariantType &)

OSN_IMPORT voidset(IAlfVariantType &aValue)[virtual]
Set the Data the variantData. From IAlfVariantType Interface. Always throws an exception always.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidContainerOperation always. Use the addItem API.

Since
S60 ?S60_version

Parameters

IAlfVariantType & aValueThe new value.

sort(const IAlfSortFunction &)

OSN_IMPORT voidsort(const IAlfSortFunction &aSortFunction)[virtual]

sorts the container using user defined sort function.

Since
S60 ?S60_version

Parameters

const IAlfSortFunction & aSortFunction- sort function.

string()

OSN_IMPORT const UString &string()const [virtual]
Get the data value as an Descriptor .From IAlfVariantType Interface. Always throws an exception.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType always since AlfContainer is not a string.

Since
S60 ?S60_version

type()

OSN_IMPORT IAlfVariantType::Typetype()const [virtual]

Get the data type.From IAlfVariantType Interface

Since
S60 ?S60_version

uinteger()

OSN_IMPORT uintuinteger()const [virtual]
Get the data value as unsigned int.From IAlfVariantType Interface. Always throws an exception.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType always since AlfContainer is not an unsigned integer.

Since
S60 ?S60_version

Member Data Documentation

auto_ptr< AlfContainerDataImpl > mContainerData

auto_ptr< AlfContainerDataImpl >mContainerData[private]