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