equal
deleted
inserted
replaced
|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <CPbkAppUiBase.h> // This class' declaration |
|
21 #include "CPbkDocumentBase.h" // Phonebook document class |
|
22 #include <CPbkAppViewBase.h> // Phonebook application view |
|
23 #include <CPbkCommandStore.h> |
|
24 #include <MPbkCommandList.h> |
|
25 |
|
26 // ================= MEMBER FUNCTIONS ======================= |
|
27 |
|
28 EXPORT_C CPbkAppUiBase::CPbkAppUiBase() |
|
29 { |
|
30 } |
|
31 |
|
32 EXPORT_C CPbkAppUiBase::~CPbkAppUiBase() |
|
33 { |
|
34 delete iCommandStore; |
|
35 } |
|
36 |
|
37 EXPORT_C CPbkDocumentBase* CPbkAppUiBase::PbkDocument() const |
|
38 { |
|
39 // Explicit cast: the document must always be of type CPbkDocumentBase |
|
40 return static_cast<CPbkDocumentBase*>(Document()); |
|
41 } |
|
42 |
|
43 EXPORT_C CPbkAppViewBase* CPbkAppUiBase::ActiveView() const |
|
44 { |
|
45 // Explicit cast: iView must always be of type CPbkAppViewBase. |
|
46 return static_cast<CPbkAppViewBase*>(iView); |
|
47 } |
|
48 |
|
49 EXPORT_C void CPbkAppUiBase::AddAndExecuteCommandL(MPbkCommand* aCommand) |
|
50 { |
|
51 if (!iCommandStore) |
|
52 { |
|
53 iCommandStore = CPbkCommandStore::NewL(); |
|
54 } |
|
55 iCommandStore->AddAndExecuteCommandL(aCommand); |
|
56 } |
|
57 |
|
58 // End of File |