Alf::AlfAttributeValueType Class Reference

class Alf::AlfAttributeValueType
A class for attribute value type. Attributes are constructed using AlfAttributeValueType objects. AlfAttributeValueType can store integer,float,string, enum and RGB data. AlfAttribute alfwidgetmodel.lib
Since
S60 ?S60_version Draft
Public Member Functions
AlfAttributeValueType (int, TAlfUnit )
AlfAttributeValueType (float, TAlfUnit )
AlfAttributeValueType (const UString &)
~AlfAttributeValueType ()
OSN_IMPORT int enumValue ()
OSN_IMPORT int intValue ()
OSN_IMPORT float realValue ()
OSN_IMPORT float rgbValue ()
OSN_IMPORT const UString & stringValue ()
OSN_IMPORT Type type ()
OSN_IMPORT TAlfUnit unit ()
Protected Member Functions
AlfAttributeValueType ()
Public Member Enumerations
enum Type { EInt , EFloat , EString }
Private Attributes
auto_ptr< AlfAttributeValueTypeImpl > mData

Constructor & Destructor Documentation

AlfAttributeValueType(int, TAlfUnit)

OSN_IMPORT AlfAttributeValueType ( int aValue,
TAlfUnit aUnit = EAlfUnitPixel
)
Constructor.
Exceptions
std::bad_alloc

Parameters

int aValue The value of the attribute.
TAlfUnit aUnit = EAlfUnitPixel Unit of the value.

AlfAttributeValueType(float, TAlfUnit)

OSN_IMPORT AlfAttributeValueType ( float aValue,
TAlfUnit aUnit = EAlfUnitNormalized
)
Constructor.
Exceptions
std::bad_alloc

Parameters

float aValue The value of the attribute.
TAlfUnit aUnit = EAlfUnitNormalized Unit of the value.

AlfAttributeValueType(const UString &)

OSN_IMPORT AlfAttributeValueType ( const UString & aValue )
Constructor.
Exceptions
std::bad_alloc

Parameters

const UString & aValue The value of the attribute. Takes a copy of the object.

AlfAttributeValueType()

AlfAttributeValueType ( ) [protected]

Constructor.

~AlfAttributeValueType()

OSN_IMPORT ~AlfAttributeValueType ( ) [virtual]

Destructor.

Member Functions Documentation

enumValue()

OSN_IMPORT int enumValue ( ) const [virtual]
Gets the enum value.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidAttributeValue if the attribute value type is not of enum type.

intValue()

OSN_IMPORT int intValue ( ) const [virtual]
Gets the integer value.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidAttributeValue if the attribute value type is not of integer type.

realValue()

OSN_IMPORT float realValue ( ) const [virtual]
Gets the real value.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidAttributeValue if the attribute value type is not of float type.

rgbValue()

OSN_IMPORT float rgbValue ( ) const [virtual]
Gets the RGB value.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidAttributeValue if the attribute value type is not of float type.

stringValue()

OSN_IMPORT const UString & stringValue ( ) const [virtual]
Gets the string value.
Exceptions
osncore::AlfDataException

Thrown with error code osncore::EInvalidAttributeValue if the attribute value type is not of string type.

type()

OSN_IMPORT Type type ( ) const [virtual]

Gets the type of the attribute value.

unit()

OSN_IMPORT TAlfUnit unit ( ) const [virtual]

Gets the unit of the value.

Member Enumerations Documentation

Enum Type

Type enumeration.

Enumerators

EInt
EFloat
EString

Member Data Documentation

auto_ptr< AlfAttributeValueTypeImpl > mData

auto_ptr< AlfAttributeValueTypeImpl > mData [private]