Alf::IAlfAttributeOwner Class Reference

class Alf::IAlfAttributeOwner : public Alf::IAlfInterfaceBase

An interface for querying and setting attributes. The interface defines a generic functionality for setting any attributes of the implementing class. It can be used also to query the available set of attributes.

The interface should by implemented by all widget classes. It can be also used by element classes. Widget attributes have often corresponding data fields in the model. In this case, setting new values should also update the model. If an attribute is related to the presentation of the widget, the presentation is updated when a new value is set for the attribute.

alfwidgetmodel.lib
Since
S60 ?S60_version Draft

Inherits from

Constructor & Destructor Documentation

~IAlfAttributeOwner()

~IAlfAttributeOwner()[inline, virtual]

Virtual destructor.

Member Functions Documentation

attributeCount()

intattributeCount()const [pure virtual]

Get the number of available attributes.

getAttribute(const UString &)

const AlfAttribute *getAttribute(const UString &aAttribName)const [pure virtual]

Gets the attribute with the given name. The returned attribute instance is owned by the widget and should not be deleted. Also the returned attribute instance should not be modified. Use SetAttribute for that.

Parameters

const UString & aAttribNameThe name of the attribute.

getAttribute(const UString &, const UString &)

const AlfAttribute *getAttribute(const UString &aTargetId,
const UString &aAttribName
)const [pure virtual]

Gets the attribute with the given name from specific target. The returned attribute instance is owned by the widget and should not be deleted. Also the returned attribute instance should not be modified. Use SetAttribute for that.

Parameters

const UString & aTargetIdThe name of the target widget part, e.g. element class
const UString & aAttribNameThe name of the attribute.

setAttribute(const AlfAttribute &)

boolsetAttribute(const AlfAttribute &aAttribute)[pure virtual]

Set a value of an attribute.

If no value is present in passed attribute parameter, an AlfAttributeException-exception is thrown with EInvalidAttribute error code.

Parameters

const AlfAttribute & aAttributeReference attribute, the data is copied from it. The ownership is not transferred.

setAttribute(const UString &, AlfAttributeValueType *)

boolsetAttribute(const UString &aAttribName,
AlfAttributeValueType *aValue
)[pure virtual]

Set a value of an attribute. This SetAttribute variant is for simple non animated attributes that only have name and value.

If no value is present in passed attributevalue parameter, an AlfAttributeException-exception is thrown with EInvalidAttribute error code.

Parameters

const UString & aAttribNameName of the attribute.
AlfAttributeValueType * aValueValue of the attribute. Ownership is transferred

setAttribute(const UString &, AlfAttribute &)

boolsetAttribute(const UString &aTargetId,
AlfAttribute &aAttribute
)[pure virtual]

Sets a value of an attribute to a specific target. The target is identified by using aTargetId parameter.

If no value is present in passed attribute parameter, an AlfAttributeException-exception is thrown with EInvalidAttribute error code.

Parameters

const UString & aTargetIdName of the target widget part, e.g element class tag.
AlfAttribute & aAttributeReference attribute, the data is copied from it. The ownership is not transferred.

setAttribute(const UString &, const UString &, AlfAttributeValueType *)

boolsetAttribute(const UString &aTargetId,
const UString &aAttribName,
AlfAttributeValueType *aValue
)[pure virtual]

Sets a value of an static attribute. This SetAttribute variant is for simple non animated attributes that only have name and value.

If no value is present in passed attributevalue parameter, an AlfAttributeException-exception is thrown with EInvalidAttribute error code.

Parameters

const UString & aTargetIdThe name of the target widget part, e.g. element class
const UString & aAttribNameName of the attribute.
AlfAttributeValueType * aValueValue of the attribute. Ownership is transferred

setAttributeContainer(AlfAttributeContainer &)

boolsetAttributeContainer(AlfAttributeContainer &aAttributeContainer)[pure virtual]

Sets values of each attribute in given container

If no value is present in an attribute in the container, an AlfAttributeException-exception is thrown with EInvalidAttribute error code.

Parameters

AlfAttributeContainer & aAttributeContainerReference attributeContainer, All attributes in the container are handled. The ownership is not transferred.

setAttributeContainer(const UString &, AlfAttributeContainer &)

boolsetAttributeContainer(const UString &aTargetId,
AlfAttributeContainer &aAttributeContainer
)[pure virtual]

Sets values of each attribute in given container to a specific target. The target is identified by using aTargetId parameter.

If no value is present in an attribute in the container, an AlfAttributeException-exception is thrown with EInvalidAttribute error code.

Parameters

const UString & aTargetIdName of the target widget part, e.g element class tag.
AlfAttributeContainer & aAttributeContainerReference attributeContainer, All attributes in the container are handled. The ownership is not transferred.

type()

const IfId &type()[static, inline]

Getter for the type identifier of this interface.

Since
S60 ?S60_versio