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

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 voidaddData(intaNumContainerIndices,
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 aNumContainerIndicesThe number of indices in aContainerIndices.
int * aContainerIndicesThe container indices to find the correct location in the data hierarchy. The ownership is transferred.
IAlfVariantType * aDataThe new data.

addData(AlfModelOperation *)

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

Parameters

AlfModelOperation * aAddOperation- An Addoperation

addModelChangeObserver(IAlfModelChangeObserver &)

OSN_IMPORT voidaddModelChangeObserver(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 & aObserverThe model change observer to be added.

clearModel()

OSN_IMPORT voidclearModel()[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 voidexecuteOperation(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 voidexecuteOperations(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 & aTypeA descriptor to identify the type of the queried interface.

notifyModelChanged()

OSN_IMPORT voidnotifyModelChanged()

Notifies the observers, that the model has changed.

removeData(int, int *)

OSN_IMPORT voidremoveData(intaNumContainerIndices,
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 aNumContainerIndicesThe number of indices in aContainerIndices.
int * aContainerIndicesThe container indices to find the correct location in the data hierarchy. The ownership is transferred.

removeData(AlfModelOperation *)

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

Parameters

AlfModelOperation * aRemoveOperation- A remove operation

removeModelChangeObserver(IAlfModelChangeObserver &)

OSN_IMPORT voidremoveModelChangeObserver(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 & aObserverThe model change observer to be removed.

setData(IAlfVariantType *)

OSN_IMPORT voidsetData(IAlfVariantType *aData)[virtual]

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

Since
S60 ?S60_version

Parameters

IAlfVariantType * aDataThe new data.

updateData(int, int *, IAlfVariantType *)

OSN_IMPORT voidupdateData(intaNumContainerIndices,
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 aNumContainerIndicesThe number of indices in aContainerIndices.
int * aContainerIndicesThe 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 *)

voidupdateData(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]