|
1 /* |
|
2 * Copyright (c) 2010 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: Factory method to create collection utility object |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <e32base.h> |
|
19 |
|
20 #include "mpxcollectionutility.h" |
|
21 |
|
22 // ============================== MEMBER FUNCTIONS ================================================= |
|
23 |
|
24 // ------------------------------------------------------------------------------------------------- |
|
25 // Create the collection utility object by mode |
|
26 // ------------------------------------------------------------------------------------------------- |
|
27 // |
|
28 MMPXCollectionUtility* MMPXCollectionUtility::NewL( MMPXCollectionObserver* aObs ) |
|
29 { |
|
30 return CMPXCollectionUtility::NewL( aObs ); |
|
31 } |
|
32 |
|
33 // ------------------------------------------------------------------------------------------------- |
|
34 // Two phase constructor |
|
35 // ------------------------------------------------------------------------------------------------- |
|
36 // |
|
37 CMPXCollectionUtility* CMPXCollectionUtility::NewL( MMPXCollectionObserver* aObs ) |
|
38 { |
|
39 CMPXCollectionUtility* p = new ( ELeave ) CMPXCollectionUtility( aObs ); |
|
40 CleanupStack::PushL( p ); |
|
41 p->ConstructL(); |
|
42 CleanupStack::Pop( p ); |
|
43 return p; |
|
44 } |
|
45 |
|
46 // ------------------------------------------------------------------------------------------------- |
|
47 // Destructor |
|
48 // ------------------------------------------------------------------------------------------------- |
|
49 // |
|
50 CMPXCollectionUtility::~CMPXCollectionUtility() |
|
51 { |
|
52 } |
|
53 |
|
54 // ------------------------------------------------------------------------------------------------- |
|
55 // C++ constructor |
|
56 // ------------------------------------------------------------------------------------------------- |
|
57 // |
|
58 CMPXCollectionUtility::CMPXCollectionUtility( MMPXCollectionObserver* /*aObs*/ ) |
|
59 { |
|
60 } |
|
61 |
|
62 // ------------------------------------------------------------------------------------------------- |
|
63 // 2nd phase constructor |
|
64 // ------------------------------------------------------------------------------------------------- |
|
65 // |
|
66 void CMPXCollectionUtility::ConstructL() |
|
67 { |
|
68 } |
|
69 |
|
70 // ------------------------------------------------------------------------------------------------- |
|
71 // Return reference to collection |
|
72 // ------------------------------------------------------------------------------------------------- |
|
73 // |
|
74 MMPXCollection& CMPXCollectionUtility::Collection() |
|
75 { |
|
76 return *this; |
|
77 } |
|
78 |
|
79 // ------------------------------------------------------------------------------------------------- |
|
80 // Destroy this object |
|
81 // ------------------------------------------------------------------------------------------------- |
|
82 // |
|
83 void CMPXCollectionUtility::Close() |
|
84 { |
|
85 delete this; |
|
86 } |
|
87 |
|
88 // ------------------------------------------------------------------------------------------------- |
|
89 // The UID identifying this collection |
|
90 // ------------------------------------------------------------------------------------------------- |
|
91 // |
|
92 TUid CMPXCollectionUtility::UidL() const |
|
93 { |
|
94 return iUid; |
|
95 } |
|
96 |
|
97 // End of file |