|
1 /* |
|
2 * Copyright (c) 2008 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: Specialized integer value class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // CLASS HEADER |
|
20 #include "cpimintvalue.h" |
|
21 #include "logger.h" |
|
22 |
|
23 // ======== MEMBER FUNCTIONS ======== |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // CPIMIntValue::NewL |
|
27 // Default two-phase constructor |
|
28 // --------------------------------------------------------------------------- |
|
29 // |
|
30 CPIMIntValue* CPIMIntValue::NewL(TPIMAttribute aAttributes, TInt aIntegerValue) |
|
31 { |
|
32 JELOG2(EPim); |
|
33 CPIMIntValue* self = new(ELeave) CPIMIntValue(aAttributes, aIntegerValue); |
|
34 |
|
35 CleanupStack::PushL(self); |
|
36 self->ConstructL(); |
|
37 CleanupStack::Pop(self); |
|
38 |
|
39 return self; |
|
40 } |
|
41 |
|
42 // --------------------------------------------------------------------------- |
|
43 // CPIMIntValue::NewLC |
|
44 // Default two-phase constructor. The newly created object is left to the |
|
45 // cleanup stack |
|
46 // --------------------------------------------------------------------------- |
|
47 // |
|
48 CPIMIntValue* CPIMIntValue::NewLC(TPIMAttribute aAttributes, TInt aIntegerValue) |
|
49 { |
|
50 JELOG2(EPim); |
|
51 CPIMIntValue* self = CPIMIntValue::NewL(aAttributes, aIntegerValue); |
|
52 CleanupStack::PushL(self); |
|
53 return self; |
|
54 } |
|
55 |
|
56 // --------------------------------------------------------------------------- |
|
57 // Destructor |
|
58 // --------------------------------------------------------------------------- |
|
59 // |
|
60 CPIMIntValue::~CPIMIntValue() |
|
61 { |
|
62 JELOG2(EPim); |
|
63 } |
|
64 |
|
65 // --------------------------------------------------------------------------- |
|
66 // CPIMIntValue::SetValue |
|
67 // (other items were commented in a header) |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 void CPIMIntValue::SetIntValue(TInt aIntegerValue) |
|
71 { |
|
72 JELOG2(EPim); |
|
73 iIntegerValue = aIntegerValue; |
|
74 } |
|
75 |
|
76 // --------------------------------------------------------------------------- |
|
77 // CPIMIntValue::Value |
|
78 // (other items were commented in a header) |
|
79 // --------------------------------------------------------------------------- |
|
80 // |
|
81 TInt CPIMIntValue::IntValue() const |
|
82 { |
|
83 JELOG2(EPim); |
|
84 return iIntegerValue; |
|
85 } |
|
86 |
|
87 // --------------------------------------------------------------------------- |
|
88 // CPIMIntValue::CPIMIntValue |
|
89 // Default C++ constructor |
|
90 // --------------------------------------------------------------------------- |
|
91 // |
|
92 CPIMIntValue::CPIMIntValue(TPIMAttribute aAttributes, TInt aIntegerValue) : |
|
93 CPIMValueBase(aAttributes), iIntegerValue(aIntegerValue) |
|
94 { |
|
95 JELOG2(EPim); |
|
96 } |
|
97 |
|
98 // --------------------------------------------------------------------------- |
|
99 // CPIMIntValue::ConstructL |
|
100 // Second phase constructor |
|
101 // --------------------------------------------------------------------------- |
|
102 // |
|
103 void CPIMIntValue::ConstructL() |
|
104 { |
|
105 JELOG2(EPim); |
|
106 } |
|
107 |
|
108 // End of file |