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 * Sortable pair of strings. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CWPStringPair.h" |
|
22 |
|
23 // ============================ MEMBER FUNCTIONS =============================== |
|
24 |
|
25 // C++ default constructor. |
|
26 CWPStringPair::CWPStringPair() |
|
27 { |
|
28 } |
|
29 |
|
30 // Destructor |
|
31 CWPStringPair::~CWPStringPair() |
|
32 { |
|
33 delete iName; |
|
34 delete iValue; |
|
35 } |
|
36 |
|
37 // --------------------------------------------------------- |
|
38 // CWPStringPair::SetL |
|
39 // --------------------------------------------------------- |
|
40 // |
|
41 void CWPStringPair::SetL( const TDesC& aName, const TDesC& aValue ) |
|
42 { |
|
43 HBufC* name = aName.AllocLC(); |
|
44 HBufC* value = aValue.AllocL(); |
|
45 CleanupStack::Pop(); // name |
|
46 |
|
47 delete iName; |
|
48 iName = name; |
|
49 iNamePtr.Set( *iName ); |
|
50 |
|
51 delete iValue; |
|
52 iValue = value; |
|
53 iValuePtr.Set( *iValue ); |
|
54 } |
|
55 |
|
56 // End of File |