Alf::AlfModel Class Reference

class Alf::AlfModel : public Alf::IAlfModel

Concerete implementation of the IAlfModel

IAlfModel alfwidgetmodel.lib
Since
S60 ?S60_version Draft

Inherits from

Constructor & Destructor Documentation

AlfModel(IAlfVariantType *)

OSN_IMPORT AlfModel ( IAlfVariantType * aDataSource )
Constructor.
Exceptions
std::bad_alloc

Since
S60 ?S60_version

Parameters

IAlfVariantType * aDataSource - datasource from where the model is initialized, ownership is transferred to the model

AlfModel()

OSN_IMPORT AlfModel ( )

The Default constructor.

Since
S60 ?S60_version

~AlfModel()

OSN_IMPORT ~AlfModel ( ) [virtual]

Class Destructor.

Since
S60 ?S60_version

Member Functions Documentation

addData(int, int *, IAlfVariantType *)

OSN_IMPORT void addData ( int aNumContainerIndices,
int * aContainerIndices,
IAlfVariantType * aData
) [virtual]

Add a number of data fields in the model data. All model change observers are notified about the change.

Exceptions
osncore::AlfDataException

Thrown with the error code osncore::EInvalidModelOperation when the operation fails.

Since
S60 ?S60_version

Parameters

int aNumContainerIndices The number of indices in aContainerIndices.
int * aContainerIndices The container indices to find the correct location in the data hierarchy. The ownership is transferred.
IAlfVariantType * aData The new data.

addData(AlfModelOperation *)

void addData ( AlfModelOperation * aAddOperation ) [private]
Internal addDataL method .
Since
S60 ?S60_version

Parameters

AlfModelOperation * aAddOperation - An Addoperation

addModelChangeObserver(IAlfModelChangeObserver &)

OSN_IMPORT void addModelChangeObserver ( IAlfModelChangeObserver & aObserver ) [virtual]

From IAlfModel . Add a new observer to be notified of any changes in the model.

Exceptions
std::bad_alloc

Since
S60 ?S60_version

Parameters

IAlfModelChangeObserver & aObserver The model change observer to be added.

clearModel()

OSN_IMPORT void clearModel ( ) [virtual]

From IAlfModel . Clears the Model.

Since
S60 ?S60_version

data()

OSN_IMPORT IAlfVariantType * data ( ) const [virtual]

From IAlfModel . Get the root data object of this model.

Since
S60 ?S60_version

executeOperation(AlfModelOperation *)

OSN_IMPORT void executeOperation ( AlfModelOperation * aOperation ) [virtual]

Api for executing one operation at a Time

Since
S60 ?S60_version
Api for executing one operation at a Time
Since
S60 ?S60_version

Parameters

AlfModelOperation * aOperation - An Operation to be executed on the model.

executeOperations(AlfPtrVector< AlfModelOperation > &)

OSN_IMPORT void executeOperations ( AlfPtrVector < AlfModelOperation > & aOperationsArray ) [virtual]

Api for executing batch operations

Exceptions
osncore::AlfDataException

Thrown with the error code osncore::EInvalidModelOperation when the operation fails.

Since
S60 ?S60_version
Api for executing batch operations
Since
S60 ?S60_version

Parameters

AlfPtrVector < AlfModelOperation > & aOperationsArray - An RPOinterArray containing the list of operations to be executed in batch.

makeInterface(const IfId &)

IAlfInterfaceBase * makeInterface ( const IfId & aType ) [virtual]

From IAlfInterfaceBase . Getter for interfaces provided by the widget classes. Derived classes should always call the base class method from the overridden makeInterface.

Since
S60 ?S60_version

Parameters

const IfId & aType A descriptor to identify the type of the queried interface.

notifyModelChanged()

OSN_IMPORT void notifyModelChanged ( )

Notifies the observers, that the model has changed.

removeData(int, int *)

OSN_IMPORT void removeData ( int aNumContainerIndices,
int * aContainerIndices
) [virtual]
Remove a number of data fields in the model data. All model change observers are notified about the change.
Exceptions
osncore::AlfDataException

Thrown with the error code osncore::EInvalidModelOperation when the operation fails.

Since
S60 ?S60_version

Parameters

int aNumContainerIndices The number of indices in aContainerIndices.
int * aContainerIndices The container indices to find the correct location in the data hierarchy. The ownership is transferred.

removeData(AlfModelOperation *)

void removeData ( AlfModelOperation * aRemoveOperation ) [private]
Internal removeDataL method .
Since
S60 ?S60_version

Parameters

AlfModelOperation * aRemoveOperation - A remove operation

removeModelChangeObserver(IAlfModelChangeObserver &)

OSN_IMPORT void removeModelChangeObserver ( IAlfModelChangeObserver & aObserver ) [virtual]

From IAlfModel . Remove an observer which is added to get notified of any changes in the model.

Since
S60 ?S60_version

Parameters

IAlfModelChangeObserver & aObserver The model change observer to be removed.

setData(IAlfVariantType *)

OSN_IMPORT void setData ( IAlfVariantType * aData ) [virtual]

Api to change the model completely at one short. From IAlfModel

Since
S60 ?S60_version

Parameters

IAlfVariantType * aData The new data.

updateData(int, int *, IAlfVariantType *)

OSN_IMPORT void updateData ( int aNumContainerIndices,
int * aContainerIndices,
IAlfVariantType * aData
) [virtual]
Change a given of data fields in the model . All model change observers are notified about the change.
Exceptions
osncore::AlfDataException

Thrown with the error code osncore::EInvalidModelOperation when the operation fails.

Since
S60 ?S60_version

Parameters

int aNumContainerIndices The number of indices in aContainerIndices.
int * aContainerIndices The container indices to find the correct location in the data hierarchy. The ownership is transferred.
IAlfVariantType * aData - The new data to be set

updateData(AlfModelOperation *)

void updateData ( AlfModelOperation * aUpdateOperation ) [private]
Internal updateDataL method .
Since
S60 ?S60_version

Parameters

AlfModelOperation * aUpdateOperation - An update operation

Member Data Documentation

auto_ptr< AlfModelImpl > mData

auto_ptr< AlfModelImpl > mData [private]