2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of COLLADABaseUtils.
6
Licensed under the MIT Open Source License,
7
for details please see LICENSE file or the website
8
http://www.opensource.org/licenses/mit-license.php
11
#include "COLLADABUStableHeaders.h"
12
#include "COLLADABUHashFunctions.h"
13
#include "COLLADABUURI.h"
14
#include "COLLADABUStringUtils.h"
18
size_t calculateHash( const String& str )
20
return calculateHash(str.c_str());
23
size_t calculateHashUpper( const String& str )
25
return calculateHashUpper(str.c_str());
28
size_t calculateHash( const char* str )
32
const char* pos = str;
35
h = (h << 4) + *pos++;
36
if ((g = (h & 0xf0000000)) != 0)
43
size_t calculateHashUpper( const char* str )
47
const char* pos = str;
50
h = (h << 4) + StringUtils::toUpperASCIIChar(*pos++);
51
if ((g = (h & 0xf0000000)) != 0)
58
size_t calculateHash( const URI& uri )
60
return calculateHash(uri.getURIString());
65
} // namespace COLLADABU