Changeset 601
- Timestamp:
- 07/22/08 05:41:21 (4 months ago)
- Files:
-
- trunk/rphp/runtime/include/pHash.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/rphp/runtime/include/pHash.h
r600 r601 34 34 // custom key type 35 35 namespace rphp { 36 typedef boost::variant< pInt, p UString > hKeyVar;37 typedef enum { hKeyInt, hKey Str } hKeyType;36 typedef boost::variant< pInt, pBString, pUString > hKeyVar; 37 typedef enum { hKeyInt, hKeyBStr, hKeyUStr } hKeyType; 38 38 } 39 39 … … 53 53 return static_cast<std::size_t>(k); 54 54 } 55 56 std::size_t operator()(const pBString &k) const { 57 return boost::hash_value(k); 58 } 55 59 56 60 std::size_t operator()(const pUString &k) const { … … 68 72 return hKeyInt; 69 73 } 74 75 hKeyType operator()(const pBString &k) const { 76 return hKeyBStr; 77 } 70 78 71 79 hKeyType operator()(const pUString &k) const { 72 return hKey Str;80 return hKeyUStr; 73 81 } 74 82 … … 82 90 83 91 h_container(const pUString k, pVarP d) : pData(d), key(k) { } 92 93 h_container(const pBString k, pVarP d) : pData(d), key(k) { } 84 94 85 95 h_container(const pInt k, pVarP d) : pData(d), key(k) { }
