Optimized shader hash to not allocate memory or perform multiple passes of string...
[platform/core/uifw/dali-core.git] / dali / internal / common / dali-hash.h
1 #ifndef __DALI_HASH__
2 #define __DALI_HASH__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20 #include <string>
21
22 namespace Dali
23 {
24
25
26 /**
27  * @brief Create a hash code for the string
28  * @param toHash string to hash
29  * @return hash code
30  */
31 unsigned long CalculateHash(const std::string& toHash);
32
33
34 /**
35  * @brief Create a hash code for 2 strings combined
36  * @param string1 first string
37  * @param string2 second string
38  * @return hash code
39  */
40 unsigned long CalculateHash(const std::string& string1, const std::string& string2);
41
42
43
44
45 } // namespace Dali
46
47 #endif // header