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()

int attributeCount ( ) 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 & aAttribName The 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 & aTargetId The name of the target widget part, e.g. element class
const UString & aAttribName The name of the attribute.

setAttribute(const AlfAttribute &)

bool setAttribute ( 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 & aAttribute Reference attribute, the data is copied from it. The ownership is not transferred.

setAttribute(const UString &, AlfAttributeValueType *)

bool setAttribute ( 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 & aAttribName Name of the attribute.
AlfAttributeValueType * aValue Value of the attribute. Ownership is transferred

setAttribute(const UString &, AlfAttribute &)

bool setAttribute ( 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 & aTargetId Name of the target widget part, e.g element class tag.
AlfAttribute & aAttribute Reference attribute, the data is copied from it. The ownership is not transferred.

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

bool setAttribute ( 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 & aTargetId The name of the target widget part, e.g. element class
const UString & aAttribName Name of the attribute.
AlfAttributeValueType * aValue Value of the attribute. Ownership is transferred

setAttributeContainer(AlfAttributeContainer &)

bool setAttributeContainer ( 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 & aAttributeContainer Reference attributeContainer, All attributes in the container are handled. The ownership is not transferred.

setAttributeContainer(const UString &, AlfAttributeContainer &)

bool setAttributeContainer ( 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 & aTargetId Name of the target widget part, e.g element class tag.
AlfAttributeContainer & aAttributeContainer Reference 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