equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2004 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 the License "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 * Implementation of CUidMap. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include <s32strm.h> |
|
24 #include "UidMap.h" |
|
25 |
|
26 // ================= MEMBER FUNCTIONS ======================= |
|
27 |
|
28 // --------------------------------------------------------- |
|
29 // CUidMap::ExternalizeL |
|
30 // --------------------------------------------------------- |
|
31 // |
|
32 void CUidMap::ExternalizeL( RWriteStream& aStream ) const |
|
33 { |
|
34 aStream.WriteInt32L( Count() ); |
|
35 for ( TInt i = 0; i < Count(); i++ ) |
|
36 { |
|
37 aStream.WriteInt32L( At( i ).iUid1 ); |
|
38 aStream.WriteInt32L( At( i ).iUid2 ); |
|
39 } |
|
40 } |
|
41 |
|
42 // --------------------------------------------------------- |
|
43 // CUidMap::InternalizeL |
|
44 // --------------------------------------------------------- |
|
45 // |
|
46 void CUidMap::InternalizeL( RReadStream& aStream ) |
|
47 { |
|
48 Reset(); |
|
49 TInt count = aStream.ReadInt32L(); |
|
50 ResizeL( count ); |
|
51 for ( TInt i = 0; i < count; i++ ) |
|
52 { |
|
53 At( i ).iUid1 = aStream.ReadInt32L(); |
|
54 At( i ).iUid2 = aStream.ReadInt32L(); |
|
55 } |
|
56 } |
|
57 |
|
58 // End of File |