VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cStringHashKey.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
6 #pragma once
7 
9 #include <vlutil/vlString.h>
10 #include <vlutil/vlHashKeys.h>
11 #include <vlutil/vlHashlist.h>
12 
13 
14 //
15 // The DtCStringHashKey class is a string hash key not based upon DtString.
16 // This is useful for longterm storage because this may consume less memory
17 // as DtStrings always take 64 bytes.
18 //
20 {
21 public:
22 
23  // empty constructor -- generally should not be called
25 
26  // default constructor
27  DtCStringHashKey(const DtString& str);
28 
29  // alternate constructor
30  DtCStringHashKey(const char* str);
31 
32  // destructor
33  virtual ~DtCStringHashKey();
34 
35  // copy constructor
37 
38  // assignment operator
39  DtCStringHashKey& operator=(const DtCStringHashKey& orig);
40 
41  // equality operator
42  virtual bool operator==(const DtBaseHashKey& other) const;
43 
44  // Make a copy of this hash key.
45  virtual DtBaseHashKey* clone() const;
46 
47  // Get hash key value.
48  virtual const char* value() const;
49  virtual const DtString stringRep() const;
50 
51  // Set hash key value
52  virtual void setValue(const char* val);
53 
54 protected:
55 
56  // Compute the hashed value for this key.
57  virtual DtU64 computeHashValue();
58 
59 protected:
60 
61  char* myString;
62 };
63 

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)