|
1 /* |
|
2 * Copyright (c) 2006 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 class that creates variant instances for 2.1. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CCAVariantFactoryImp.h" |
|
22 #include <bldvariant.hrh> |
|
23 |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CCAVariantFactoryImp::CCAVariantFactoryImp |
|
29 // C++ default constructor can NOT contain any code, that |
|
30 // might leave. |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 CCAVariantFactoryImp::CCAVariantFactoryImp() |
|
34 { |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // CCAVariantFactoryImp::NewL |
|
39 // Two-phased constructor. |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 CCAVariantFactoryImp* CCAVariantFactoryImp::NewL() |
|
43 { |
|
44 CCAVariantFactoryImp* self = new( ELeave ) CCAVariantFactoryImp; |
|
45 return self; |
|
46 } |
|
47 |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CCAVariantFactoryImp::~CCAVariantFactoryImp |
|
51 // Destructor |
|
52 // ----------------------------------------------------------------------------- |
|
53 |
|
54 CCAVariantFactoryImp::~CCAVariantFactoryImp() |
|
55 { |
|
56 delete iSkinVariant; |
|
57 delete iOpBrandVariant; |
|
58 delete iAHVariant; |
|
59 } |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // CCAVariantFactoryImp::SkinVariantL |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 MCASkinVariant* CCAVariantFactoryImp::SkinVariantL() |
|
66 { |
|
67 if ( !iSkinVariant ) |
|
68 { |
|
69 iSkinVariant = CCASkinVariant20::NewL( OpBrandVariantL() ); |
|
70 } |
|
71 |
|
72 return iSkinVariant; |
|
73 } |
|
74 |
|
75 // ----------------------------------------------------------------------------- |
|
76 // CCAVariantFactoryImp::OpBrandVariantL |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 MCAOpBrandVariant* CCAVariantFactoryImp::OpBrandVariantL() |
|
80 { |
|
81 if ( !iOpBrandVariant ) |
|
82 { |
|
83 iOpBrandVariant = CCAOpBrandVariant21::NewL(); |
|
84 } |
|
85 |
|
86 return iOpBrandVariant; |
|
87 } |
|
88 |
|
89 // ----------------------------------------------------------------------------- |
|
90 // CCAVariantFactoryImp::AHVariantL |
|
91 // ----------------------------------------------------------------------------- |
|
92 // |
|
93 MCAAHVariant* CCAVariantFactoryImp::AHVariantL() |
|
94 { |
|
95 if ( !iAHVariant ) |
|
96 { |
|
97 iAHVariant = CCAAHVariant20::NewL(); |
|
98 } |
|
99 return iAHVariant; |
|
100 } |
|
101 |
|
102 // End of File |