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. AlfAttributealfwidgetmodel.lib
Since
S60 ?S60_version Draft
Public Member Functions
AlfAttributeValueType(int, TAlfUnit)
AlfAttributeValueType(float, TAlfUnit)
AlfAttributeValueType(const UString &)
~AlfAttributeValueType()
OSN_IMPORT intenumValue()
OSN_IMPORT intintValue()
OSN_IMPORT floatrealValue()
OSN_IMPORT floatrgbValue()
OSN_IMPORT const UString &stringValue()
OSN_IMPORT Typetype()
OSN_IMPORT TAlfUnitunit()
Protected Member Functions
AlfAttributeValueType()
Public Member Enumerations
enumType { EInt, EFloat, EString }
Private Attributes
auto_ptr< AlfAttributeValueTypeImpl >mData

Constructor & Destructor Documentation

AlfAttributeValueType(int, TAlfUnit)

OSN_IMPORTAlfAttributeValueType(intaValue,
TAlfUnitaUnit = EAlfUnitPixel
)
Constructor.
Exceptions
std::bad_alloc

Parameters

int aValueThe value of the attribute.
TAlfUnit aUnit = EAlfUnitPixelUnit of the value.

AlfAttributeValueType(float, TAlfUnit)

OSN_IMPORTAlfAttributeValueType(floataValue,
TAlfUnitaUnit = EAlfUnitNormalized
)
Constructor.
Exceptions
std::bad_alloc

Parameters

float aValueThe value of the attribute.
TAlfUnit aUnit = EAlfUnitNormalizedUnit of the value.

AlfAttributeValueType(const UString &)

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

Parameters

const UString & aValueThe 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 intenumValue()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 intintValue()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 floatrealValue()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 floatrgbValue()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 Typetype()const [virtual]

Gets the type of the attribute value.

unit()

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