VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vlutil
vlHashKeys.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
8
#pragma once
9
10
#include "
vlMachineTypes.h
"
11
#include "
vlString.h
"
12
#include <string>
13
14
#ifdef DtUSE_UTILITIES_NAMESPACE
15
namespace
DtUSE_UTILITIES_NAMESPACE
16
{
17
#endif
18
23
class
DT_DLL_VLUTIL
DtBaseHashKey
24
{
25
public
:
26
28
DtBaseHashKey
();
29
31
virtual
~
DtBaseHashKey
();
32
34
DtBaseHashKey
(
const
DtBaseHashKey
& orig);
35
37
DtBaseHashKey
& operator=(
const
DtBaseHashKey
& orig);
38
40
virtual
bool
operator==
(
const
DtBaseHashKey
& other)
const
;
41
43
virtual
bool
operator!=
(
const
DtBaseHashKey
& other)
const
;
44
47
virtual
DtU32
hashValue()
const
;
48
50
virtual
DtBaseHashKey
* clone()
const
= 0;
51
53
virtual
const
DtString
stringRep()
const
= 0;
54
58
virtual
bool
equalTo(
const
DtBaseHashKey
& otherKey)
const
;
59
60
protected
:
61
63
virtual
DtU32
computeHashValue() = 0;
64
65
66
protected
:
67
69
mutable
bool
myHashValueIsComputed
;
70
72
mutable
DtU32
myHashValue
;
73
};
74
75
80
class
DT_DLL_VLUTIL
DtIntHashKey
:
public
DtBaseHashKey
81
{
82
public
:
83
85
DtIntHashKey
(
DtU32
num);
86
88
virtual
~
DtIntHashKey
();
89
91
DtIntHashKey
(
const
DtIntHashKey
& orig);
92
94
DtIntHashKey
& operator=(
const
DtIntHashKey
& orig);
95
97
virtual
DtBaseHashKey
* clone()
const
;
98
100
virtual
DtU32
value()
const
;
101
103
virtual
const
DtString
stringRep()
const
;
104
107
virtual
bool
equalTo(
const
DtBaseHashKey
& otherKey)
const
;
108
109
protected
:
110
112
virtual
DtU32
computeHashValue();
113
114
protected
:
115
116
DtU32
myNum
;
117
};
118
119
130
class
DT_DLL_VLUTIL
DtPtrHashKey
:
public
DtBaseHashKey
131
{
132
public
:
133
135
DtPtrHashKey
(
void
*ptr);
136
138
virtual
~
DtPtrHashKey
();
139
141
DtPtrHashKey
(
const
DtPtrHashKey
& orig);
142
144
DtPtrHashKey
& operator=(
const
DtPtrHashKey
& orig);
145
147
virtual
DtBaseHashKey
* clone()
const
;
148
150
virtual
void
*value()
const
;
151
153
virtual
const
DtString
stringRep()
const
;
154
157
virtual
bool
equalTo(
const
DtBaseHashKey
& otherKey)
const
;
158
159
protected
:
160
162
virtual
DtU32
computeHashValue();
163
164
protected
:
165
166
void
*
myPtr
;
167
};
168
173
class
DT_DLL_VLUTIL
DtStringHashKey
:
public
DtBaseHashKey
174
{
175
public
:
176
178
DtStringHashKey
();
179
181
DtStringHashKey
(
const
DtString
& str);
182
184
DtStringHashKey
(
const
char
* str);
185
187
virtual
~
DtStringHashKey
();
188
190
DtStringHashKey
(
const
DtStringHashKey
& orig);
191
193
DtStringHashKey
& operator=(
const
DtStringHashKey
& orig);
194
196
virtual
DtBaseHashKey
* clone()
const
;
197
199
virtual
const
DtString
& value()
const
;
200
202
virtual
void
setValue(
const
DtString
& val);
203
205
virtual
const
DtString
stringRep()
const
;
206
207
protected
:
208
210
virtual
DtU32
computeHashValue();
211
212
213
protected
:
214
215
DtString
myString
;
216
};
217
222
class
DT_DLL_VLUTIL
DtWStringHashKey
:
public
DtBaseHashKey
223
{
224
public
:
225
227
DtWStringHashKey
();
228
230
DtWStringHashKey
(
const
std::wstring& str);
231
233
DtWStringHashKey
(
const
wchar_t
* str);
234
236
virtual
~
DtWStringHashKey
();
237
239
DtWStringHashKey
(
const
DtWStringHashKey
& orig);
240
242
DtWStringHashKey
& operator=(
const
DtWStringHashKey
& orig);
243
245
virtual
DtBaseHashKey
* clone()
const
;
246
248
virtual
const
std::wstring& value()
const
;
249
251
virtual
void
setValue(
const
std::wstring& val);
252
256
virtual
const
DtString
stringRep()
const
;
257
258
protected
:
259
261
virtual
DtU32
computeHashValue();
262
263
264
protected
:
265
266
std::wstring
myString
;
267
};
268
269
#ifdef DtUSE_UTILITIES_NAMESPACE
270
}
271
#endif
272
273
Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)