1 |
/********************************************************************** |
2 |
* Copyright (C) 2002-2003 by Gezelter's Group
|
3 |
*This program is free software; you can redistribute it and/or modify
|
4 |
*it under the terms of the GNU General Public License as published by
|
5 |
*the Free Software Foundation version 2 of the License.
|
6 |
*
|
7 |
*This program is distributed in the hope that it will be useful,
|
8 |
*but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9 |
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
10 |
*GNU General Public License for more details.
|
11 |
*
|
12 |
************************************************************************ |
13 |
*Author: Teng Lin Email: tlin@nd.edu |
14 |
*Date: 08/13/2002 Version: 1.0 |
15 |
* |
16 |
************************************************************************ |
17 |
*Description: |
18 |
* |
19 |
***********************************************************************/ |
20 |
|
21 |
#include "keylist.h" |
22 |
|
23 |
//member function for TKeyList |
24 |
template<class T1,class T2, class THashFcn, class TEqualKey> |
25 |
TKeyList<T1, T2, THashFcn, TEqualKey>::TKeyList() |
26 |
{ |
27 |
_num = 0; |
28 |
_keys.clear(); |
29 |
_data.clear(); |
30 |
_hashTable.clear(); |
31 |
} |
32 |
|
33 |
//memory |
34 |
template<class T1,class T2, class THashFcn, class TEqualKey> |
35 |
TKeyList<T1, T2, THashFcn, TEqualKey>::~TKeyList() |
36 |
{ |
37 |
|
38 |
_num = 0; |
39 |
_keys.clear(); |
40 |
_data.clear(); |
41 |
_hashTable.clear(); |
42 |
|
43 |
} |
44 |
|
45 |
template<class T1,class T2, class THashFcn, class TEqualKey> |
46 |
int TKeyList<T1, T2, THashFcn, TEqualKey>::AddKey(T1 key, T2 data) |
47 |
{ |
48 |
|
49 |
} |
50 |
|
51 |
template<class T1,class T2, class THashFcn, class TEqualKey> |
52 |
int TKeyList<T1, T2, THashFcn, TEqualKey>::GetIndex(T1 key) |
53 |
{ |
54 |
|
55 |
} |
56 |
|
57 |
|
58 |
template<class T1,class T2, class THashFcn, class TEqualKey> |
59 |
const T2& TKeyList<T1, T2, THashFcn, TEqualKey>::GetDataByKey(string &str) const |
60 |
{ |
61 |
|
62 |
} |
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|