| 2154 | } |
| 2155 | |
| 2156 | dmhash_t GetAbsoluteIdentifier(HInstance instance, const char* identifier) |
| 2157 | { |
| 2158 | // check for global id (/foo/bar) |
| 2159 | if (*identifier == *ID_SEPARATOR) |
| 2160 | { |
| 2161 | return dmHashBuffer64(identifier, strlen(identifier)); |
| 2162 | } |
| 2163 | else |
| 2164 | { |
| 2165 | // Make a copy of the state. |
| 2166 | HashState64 tmp_state; |
| 2167 | dmHashClone64(&tmp_state, &instance->m_CollectionPathHashState, false); |
| 2168 | dmHashUpdateBuffer64(&tmp_state, identifier, strlen(identifier)); |
| 2169 | return dmHashFinal64(&tmp_state); |
| 2170 | } |
| 2171 | } |
| 2172 | |
| 2173 | HInstance GetInstanceFromIdentifier(Collection* collection, dmhash_t identifier) |
| 2174 | { |