Alf::AlfContainer Class Reference

class Alf::AlfContainer : public Alf::IAlfContainer

Inherits from

Public Member Functions
AlfContainer ()
~AlfContainer ()
OSN_IMPORT void addItem ( IAlfVariantType *)
OSN_IMPORT void addItem ( uint , IAlfVariantType *)
OSN_IMPORT bool boolean ()
OSN_IMPORT IAlfBranch * branch ()
OSN_IMPORT void clear ()
OSN_IMPORT IAlfContainer * clone ()
OSN_IMPORT IAlfContainer * container ()
OSN_IMPORT int count ()
OSN_IMPORT IAlfModelBase * customData ()
OSN_IMPORT int integer ()
OSN_IMPORT IAlfVariantType * item ( uint )
OSN_IMPORT IAlfMap * map ()
OSN_IMPORT bool operator== (const IAlfVariantType &)
OSN_IMPORT double real ()
OSN_IMPORT void removeItem ( uint )
OSN_IMPORT void replaceItem ( uint , IAlfVariantType *)
OSN_IMPORT void set ( IAlfVariantType &)
OSN_IMPORT void sort (const IAlfSortFunction &)
OSN_IMPORT const UString & string ()
OSN_IMPORT IAlfVariantType::Type type ()
OSN_IMPORT uint uinteger ()
Private Member Functions
void construct ()
Inherited Functions
Alf::IAlfContainer::~IAlfContainer()
Alf::IAlfVariantType::~IAlfVariantType()
Inherited Enumerations
Alf::IAlfVariantType:Type
Private Attributes
auto_ptr< AlfContainerDataImpl > mContainerData

Constructor & Destructor Documentation

AlfContainer()

OSN_IMPORT AlfContainer ( )
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 void addItem ( 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 void addItem ( uint aIndex,
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 bool boolean ( ) 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 void clear ( ) [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()

void construct ( ) [private]

container()

OSN_IMPORT IAlfContainer * container ( ) [virtual]

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

Since
S60 ?S60_version

count()

OSN_IMPORT int count ( ) [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 int integer ( ) 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 ( uint aIndex ) [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 bool operator== ( 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 & aOther object to compare against.

real()

OSN_IMPORT double real ( ) 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 void removeItem ( uint aIndex ) [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 void replaceItem ( uint aIndex,
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 void set ( 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 & aValue The new value.

sort(const IAlfSortFunction &)

OSN_IMPORT void sort ( 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::Type type ( ) const [virtual]

Get the data type.From IAlfVariantType Interface

Since
S60 ?S60_version

uinteger()

OSN_IMPORT uint uinteger ( ) 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]