Alf::AlfVariantType Class Reference

class Alf::AlfVariantType : public Alf::IAlfVariantType
Concrete implementation of the variant data type interface. AlfVariantType can hold data of integer,real,string and unsigned integer types. IAlfVariantType alfwidgetmodel.lib
Since
S60 ?S60_version Draft
Concrete implementation of the variant data type interface. Simple default container of variant types. IAlfContainer alfwidgetmodel.lib
Since
S60 ?S60_version Draft

Inherits from

Public Member Functions
AlfVariantType (const UString &)
AlfVariantType (const int &)
AlfVariantType (const uint &)
AlfVariantType (const double &)
AlfVariantType ( IAlfModelBase *)
AlfVariantType (const bool &)
AlfVariantType ()
~AlfVariantType ()
OSN_IMPORT bool boolean ()
OSN_IMPORT IAlfBranch * branch ()
OSN_IMPORT IAlfContainer * container ()
OSN_IMPORT IAlfModelBase * customData ()
OSN_IMPORT int integer ()
OSN_IMPORT IAlfMap * map ()
OSN_IMPORT bool operator== (const IAlfVariantType &)
OSN_IMPORT double real ()
OSN_IMPORT void set ( IAlfVariantType &)
OSN_IMPORT const UString & string ()
OSN_IMPORT IAlfVariantType::Type type ()
OSN_IMPORT uint uinteger ()
Private Member Functions
void construct ( Type )
Inherited Functions
Alf::IAlfVariantType::~IAlfVariantType()
Inherited Enumerations
Alf::IAlfVariantType:Type
Private Attributes
auto_ptr< AlfVariantDataImpl > mVarData

Constructor & Destructor Documentation

AlfVariantType(const UString &)

OSN_IMPORT AlfVariantType ( const UString & aValue )
Constructor for variant data type creation for a descriprtor type of data
Exceptions
std::bad_alloc

Since
S60 ?S60_version

Parameters

const UString & aValue - Descriptor to be assigned for the variant data

AlfVariantType(const int &)

OSN_IMPORT AlfVariantType ( const int & aValue )
Constructor for variant data type creation for a integer type of data
Exceptions
std::bad_alloc

Since
S60 ?S60_version

Parameters

const int & aValue - integer to be assigned for the variant data

AlfVariantType(const uint &)

OSN_IMPORT AlfVariantType ( const uint & aValue )
Constructor for variant data type creation for a Unsigned integer type of data
Exceptions
std::bad_alloc

Since
S60 ?S60_version

Parameters

const uint & aValue - unsigned integer to be assigned for the variant data

AlfVariantType(const double &)

OSN_IMPORT AlfVariantType ( const double & aValue )
Constructor for variant data type creation for a real type of data
Exceptions
std::bad_alloc

Since
S60 ?S60_version

Parameters

const double & aValue - Real value to be assigned for the variant data

AlfVariantType(IAlfModelBase *)

OSN_IMPORT AlfVariantType ( IAlfModelBase * aValue )
Constructor for variant data type creation for a user defined type of data
Exceptions
std::bad_alloc

Since
S60 ?S60_version

Parameters

IAlfModelBase * aValue - IAlfModelBase* to be assigned for the variant data

AlfVariantType(const bool &)

OSN_IMPORT AlfVariantType ( const bool & aValue )
Constructor for variant data type creation for a bool type of data
Exceptions
std::bad_alloc

Since
S60 ?S60_version

Parameters

const bool & aValue - Boolean value to be assigned for the variant data

AlfVariantType()

OSN_IMPORT AlfVariantType ( )

The default constructor.

Since
S60 ?S60_version

~AlfVariantType()

OSN_IMPORT ~AlfVariantType ( )

Destructor

Since
S60 ?S60_version

Member Functions Documentation

boolean()

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

Thrown with error code osncore::EInvalidVariantDataType if aValue is not of boolean type.

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 AlfVariantType is not a branch.

Since
S60 ?S60_version

construct(Type)

void construct ( Type aType ) [private]

2nd Phase Constructor

Since
S60 ?S60_version

Parameters

Type aType

container()

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

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

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 if aValue is not of custom type.

Since
S60 ?S60_version

integer()

OSN_IMPORT int integer ( ) const [virtual]
Get the data value as an Integer .From IAlfVariantType Interface
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType if aValue is not of integer type.

Since
S60 ?S60_version

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 AlfVariantType is not a map.

Since
S60 ?S60_version

operator==(const IAlfVariantType &)

OSN_IMPORT bool operator== ( const IAlfVariantType & aOther ) const
Equality comparison operator.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType if aValue is of invalid type.

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

Thrown with error code osncore::EInvalidVariantDataType if aValue is not of real type.

Since
S60 ?S60_version

set(IAlfVariantType &)

OSN_IMPORT void set ( IAlfVariantType & aValue ) [virtual]
Set the Data the variantData. From IAlfVariantType Interface
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidVariantDataType if aValue is of invalid type.

std::bad_alloc

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

Thrown with error code osncore::EInvalidVariantDataType if aValue is not of string type.

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

Thrown with error code osncore::EInvalidVariantDataType if aValue is not of unsigned integer type.

Since
S60 ?S60_version

Member Data Documentation

auto_ptr< AlfVariantDataImpl > mVarData

auto_ptr< AlfVariantDataImpl > mVarData [private]