|
1 /* |
|
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This interface defines a generic data type |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef I_ALFMODELCHANGEOBSERVER_H |
|
20 #define I_ALFMODELCHANGEOBSERVER_H |
|
21 |
|
22 //INCLUDES |
|
23 |
|
24 namespace osncore |
|
25 { |
|
26 template <class T> class AlfPtrVector; |
|
27 } |
|
28 using namespace osncore; |
|
29 |
|
30 namespace Alf |
|
31 { |
|
32 |
|
33 /* Forward declarations*/ |
|
34 class IAlfModel; |
|
35 class AlfModelOperation; |
|
36 |
|
37 /** |
|
38 * An interface for observing the changes in the model. |
|
39 * @lib hitchcockwidgetmodel.lib |
|
40 * @since S60 ?S60_version |
|
41 * @status Draft |
|
42 */ |
|
43 class IAlfModelChangeObserver |
|
44 { |
|
45 public: |
|
46 /** Virtual destructor.*/ |
|
47 virtual ~IAlfModelChangeObserver() {} |
|
48 |
|
49 /** |
|
50 * Notify the observer that the model has changed. |
|
51 * |
|
52 * @param aModel The new model. |
|
53 * @since S60 ?S60_version |
|
54 */ |
|
55 virtual void modelChanged( IAlfModel& aModel ) = 0; |
|
56 |
|
57 /** |
|
58 * Notify the observers that a number of change operations |
|
59 * are about to be performed on the model. |
|
60 * |
|
61 * @param aArrayOfOperation An Array containing the operations performed on the model. |
|
62 * @since S60 ?S60_version |
|
63 */ |
|
64 virtual void dataChanging( const AlfPtrVector<AlfModelOperation>& aArrayOfOperation ) = 0; |
|
65 |
|
66 /** |
|
67 * Notify the observers that a change operation |
|
68 * is about to be performed on the model. |
|
69 * |
|
70 * @param aOperation An operation performed on the model. |
|
71 * @since S60 ?S60_version |
|
72 */ |
|
73 virtual void dataChanging( const AlfModelOperation& aOperation ) = 0; |
|
74 |
|
75 /** |
|
76 * Notify the observers that the data of the model has been changed. |
|
77 * This is called automatically after any DataChangingL() call. |
|
78 * |
|
79 * @since S60 ?S60_version |
|
80 */ |
|
81 virtual void dataChanged() = 0; |
|
82 }; |
|
83 |
|
84 |
|
85 } // namespace Alf |
|
86 |
|
87 #endif // I_ALFMODELCHANGEOBSERVER_H |
|
88 |
|
89 // End of File |