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. IAlfMapalfwidgetmodel.lib
Since
S60 ?S60_version Draft

Inherits from

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

Constructor & Destructor Documentation

AlfMap()

OSN_IMPORTAlfMap()
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 voidaddItem(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 voidaddItem(uintaIndex,
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 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 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 voidclear()[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()

voidconstruct()[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 intcount()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 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 AlfMap 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

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 intitemIndex(const UString &aName)[virtual]
Gets the index of the item by the given name.
Since
S60 ?S60_version

Parameters

const UString & aNameThe 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(uintaIndex)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 booloperator==(const IAlfVariantType &aOther)const

Equality comparison operator.

Since
S60 ?S60_version

Parameters

const IAlfVariantType & aOther

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 AlfMap 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.
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 voidremoveItem(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 voidreplaceItem(uintaIndex,
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 voidreplaceItem(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 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::EInvalidMapOperation always. Use the addItem API.

Since
S60 ?S60_version

Parameters

IAlfVariantType & aValueThe 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::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 AlfMap is not an unsigned integer.

Since
S60 ?S60_version

Member Data Documentation

auto_ptr< AlfMapDataImpl > mMapDataImpl

auto_ptr< AlfMapDataImpl >mMapDataImpl[private]