|
1 /* |
|
2 * Copyright (c) 2002 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: Model base class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "lpdbasemodel.h" |
|
21 #include <eikenv.h> |
|
22 #include "locrequestorutilsresolver.h" |
|
23 #include "lpdrequestorprocessor.h" |
|
24 #include "locconsts.h" |
|
25 |
|
26 |
|
27 // ============================ MEMBER FUNCTIONS =============================== |
|
28 |
|
29 // ----------------------------------------------------------------------------- |
|
30 // CLpdBaseModel::CLpdBaseModel |
|
31 // C++ default constructor can NOT contain any code, that |
|
32 // might leave. |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 CLpdBaseModel::CLpdBaseModel( |
|
36 const CLpdRequestorProcessor& aRtorProcessor ) |
|
37 : iRtorProcessor( aRtorProcessor ) |
|
38 { |
|
39 // Intentionally empty |
|
40 } |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // CLpdBaseModel::BaseConstructL |
|
44 // Symbian 2nd phase constructor can leave. |
|
45 // ----------------------------------------------------------------------------- |
|
46 // |
|
47 void CLpdBaseModel::BaseConstructL() |
|
48 { |
|
49 iBuffer = HBufC::NewL( KLocLBLineMaxLen + KLocLBItemFormatMaxLen ); |
|
50 iUtils = CLocRequestorUtilsResolver::NewL(); |
|
51 } |
|
52 |
|
53 // Destructor |
|
54 CLpdBaseModel::~CLpdBaseModel() |
|
55 { |
|
56 delete iBuffer; |
|
57 delete iUtils; |
|
58 } |
|
59 |
|
60 // ----------------------------------------------------------------------------- |
|
61 // CLpdBaseModel::MdcaPoint |
|
62 // (other items were commented in a header). |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 TPtrC16 CLpdBaseModel::MdcaPoint( TInt aIndex ) const |
|
66 { |
|
67 TRAPD( err, MdcaPointL( aIndex ) ); |
|
68 if ( err ) |
|
69 { |
|
70 iBuffer->Des().Zero(); |
|
71 CEikonEnv::Static()->HandleError(err); |
|
72 } |
|
73 return *iBuffer; |
|
74 } |
|
75 |
|
76 // End of File |