Alf::AlfMap Class Reference

class Alf::AlfMap : public Alf::IAlfMap
Concrete implementation of the variant data type interface. Simple map of variant types.The map is contains data and a key. IAlfMap alfwidgetmodel.lib
Since
S60 ?S60_version Draft

Inherits from

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

Constructor & Destructor Documentation

AlfMap()

OSN_IMPORT AlfMap ( )
1st phase Constructor for creating a variant data type which can store a AlfMap
Exceptions
std::bad_alloc

Since
S60 ?S60_version

~AlfMap()

OSN_IMPORT ~AlfMap ( )
Destructor
Since
S60 ?S60_version

Member Functions Documentation

addItem(IAlfVariantType *, const UString &)

OSN_IMPORT void addItem ( IAlfVariantType * aData,
const UString & aName
) [virtual]
Adds a variantData item into the container .From IAlfContainer interface
Exceptions
std::bad_alloc

Since
S60 ?S60_version

Parameters

IAlfVariantType * aData
const UString & aName - name of the data that needs to be added

addItem(uint, IAlfVariantType *, const UString &)

OSN_IMPORT void addItem ( uint aIndex,
IAlfVariantType * aData,
const UString & aName
) [virtual]
Adds a variantData item into the container .From IAlfContainer interface
Exceptions
std::bad_alloc

index where the data is added

Since
S60 ?S60_version

Parameters

uint aIndex
IAlfVariantType * aData
const UString & aName - name of the data that needs to be added

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 AlfMap is not boolean.

Since
S60 ?S60_version

branch()

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

Thrown with error code osncore::EInvalidVariantDataType always since AlfMap is not a branch.

Since
S60 ?S60_version

clear()

OSN_IMPORT void clear ( ) [virtual]

Clear the Container. From IAlfContainer interface

Since
S60 ?S60_version

clone()

OSN_IMPORT IAlfMap * 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 Always throws an exception.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType always since AlfMap is not a container.

Since
S60 ?S60_version

count()

OSN_IMPORT int count ( ) const [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.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType always since AlfMap 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 AlfMap 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

item(const UString &)

OSN_IMPORT IAlfVariantType * item ( const UString & aName ) [virtual]
Gets the Item for a given name in the map. From IAlfContainer interface
Since
S60 ?S60_version

Parameters

const UString & aName - name of the element that is required

itemIndex(const UString &)

OSN_IMPORT int itemIndex ( const UString & aName ) [virtual]
Gets the index of the item by the given name.
Since
S60 ?S60_version

Parameters

const UString & aName The name associated with requested item.

map()

OSN_IMPORT IAlfMap * map ( ) [virtual]

Get the data value as Map .From IAlfVariantType Interface

Since
S60 ?S60_version

name(uint)

const UString & name ( uint aIndex ) const [virtual]
Gets the Name at a given index in the container
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidArrayIndex if aIndex is invalid.

Since
S60 ?S60_version

Parameters

uint aIndex - index at which the name of the element in the map is required

operator==(const IAlfVariantType &)

OSN_IMPORT bool operator== ( const IAlfVariantType & aOther ) const

Equality comparison operator.

Since
S60 ?S60_version

Parameters

const IAlfVariantType & aOther

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 AlfMap 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.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidMapOperation if the removeItem fails.

Since
S60 ?S60_version

Parameters

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

removeItem(const UString &)

OSN_IMPORT void removeItem ( const UString & aName ) [virtual]
Removes an item for a given Name in map. From IAlfContainer interface
Exceptions
std::bad_alloc

osncore::AlfDataException

Thrown with error code osncore::EInvalidMapOperation if the removeItem fails.

Since
S60 ?S60_version

Parameters

const UString & aName - name of the element that 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
std::bad_alloc

osncore::AlfDataException

Thrown with error code osncore::EInvalidMapOperation 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

replaceItem(const UString &, IAlfVariantType *)

OSN_IMPORT void replaceItem ( const UString & aName,
IAlfVariantType * aNewData
) [virtual]
Replace an item for a given name in the container
Exceptions
std::bad_alloc

osncore::AlfDataException

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

Since
S60 ?S60_version

Parameters

const UString & aName - name of the element that 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::EInvalidMapOperation always. Use the addItem API.

Since
S60 ?S60_version

Parameters

IAlfVariantType & aValue The new value.

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 AlfMap is not a string value.

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 AlfMap is not an unsigned integer.

Since
S60 ?S60_version

Member Data Documentation

auto_ptr< AlfMapDataImpl > mMapDataImpl

auto_ptr< AlfMapDataImpl > mMapDataImpl [private]