equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 1997-2009 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _NAMEIDMA_H_ |
|
20 #define _NAMEIDMA_H_ |
|
21 |
|
22 #include "ARRAY.H" |
|
23 #include "ASTRING.H" |
|
24 |
|
25 class NameIdItem : public ArrayItem |
|
26 { |
|
27 friend ostream& operator<<(ostream & os, NameIdItem & o); |
|
28 public: |
|
29 NameIdItem(String aNameToSet,unsigned long aIdToSet); |
|
30 public: |
|
31 String iName; |
|
32 unsigned long iId; |
|
33 }; |
|
34 |
|
35 class NameIdMap : public Array |
|
36 { |
|
37 friend ostream& operator<<(ostream & os,NameIdMap& aMap); |
|
38 public: |
|
39 NameIdMap(); |
|
40 ~NameIdMap(); |
|
41 void Add( String Name, unsigned long aId); |
|
42 unsigned long FindId( String Name) const; |
|
43 int IsStored( String Name) const; |
|
44 |
|
45 }; |
|
46 |
|
47 class NameIdMapIterator : public ArrayIterator |
|
48 { |
|
49 public: |
|
50 NameIdMapIterator( const NameIdMap & c); |
|
51 NameIdItem * operator() (); |
|
52 }; |
|
53 |
|
54 #endif |