VR-Forces 4.1 Class Documentation
cstringHashKey.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2004 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: cstringHashKey.h,v $ $Revision: 1.3 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef cstringHashKey_H_
10 #define cstringHashKey_H_
11 
12 #include "tdbutil/tdbUtilDefines.h"
13 #include <vlutil/vlString.h>
14 #include <vlutil/vlHashKeys.h>
15 #include <vlutil/vlHashlist.h>
16 
17 
18 //
19 // The DtCStringHashKey class is a string hash key not based upon DtString.
20 // This is useful for longterm storage because this may consume less memory
21 // as DtStrings always take 64 bytes.
22 //
24 {
25 public:
26 
27  // empty constructor -- generally should not be called
29 
30  // default constructor
31  DtCStringHashKey(const DtString& str);
32 
33  // alternate constructor
34  DtCStringHashKey(const char* str);
35 
36  // destructor
37  virtual ~DtCStringHashKey();
38 
39  // copy constructor
41 
42  // assignment operator
43  DtCStringHashKey& operator=(const DtCStringHashKey& orig);
44 
45  // equality operator
46  virtual bool operator==(const DtBaseHashKey& other) const;
47 
48  // Make a copy of this hash key.
49  virtual DtBaseHashKey* clone() const;
50 
51  // Get hash key value.
52  virtual const char* value() const;
53  virtual const DtString stringRep() const;
54 
55  // Set hash key value
56  virtual void setValue(const char* val);
57 
58 protected:
59 
60  // Compute the hashed value for this key.
61  virtual DtU32 computeHashValue();
62 
63 protected:
64 
65  char* myString;
66 };
67 
68 #endif
69 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)