version 1.20, 2005/08/10 19:42:49
|
version 1.22, 2006/01/30 16:17:04
|
|
|
//%2005//////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development | // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. | // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. | // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; | // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
// EMC Corporation; VERITAS Software Corporation; The Open Group. | // EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
} | } |
}; | }; |
| |
/* |
// |
Hash function object that converts to lowercase. |
// Computes a hash code for a string without regard to case. For example, it |
|
// yields the same hash code for "AB", "ab", "Ab", and "aB". |
This function can be used for hash table keys constructed from strings that |
// |
should be treated as case insensitive (e.g. class names, namespace names, |
struct PEGASUS_COMMON_LINKAGE HashLowerCaseFunc |
system names). |
|
|
|
Note: this function converts to lower case based on the process locale. |
|
*/ |
|
struct HashLowerCaseFunc |
|
{ |
|
static Uint32 hash (const String & str) |
|
{ | { |
String cpy (str); |
static Uint32 hash(const String& str); |
cpy.toLower (); |
|
Uint32 h = 0; |
|
for (Uint32 i = 0, n = cpy.size (); i < n; i++) |
|
h = 5 * h + cpy [i]; |
|
return h; |
|
} |
|
}; | }; |
| |
/* This is a function object used by the HashTable to compare keys. This is | /* This is a function object used by the HashTable to compare keys. This is |