Merge "Alarm refactoring : remove IPC between appfw and app-service" into tizen_2.1
[platform/framework/native/appfw.git] / inc / FBaseColIHashCodeProviderT.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file                FBaseColIHashCodeProviderT.h
20  * @brief               This is the header file for the %IHashCodeProviderT interface.
21  *
22  * This header file contains the declarations of the %IHashCodeProviderT interface.
23  */
24 #ifndef _FBASE_COL_IHASH_CODE_PROVIDER_T_H_
25 #define _FBASE_COL_IHASH_CODE_PROVIDER_T_H_
26
27 namespace Tizen { namespace Base { namespace Collection
28 {
29
30 /**
31  * @interface   IHashCodeProviderT
32  * @brief       This interface represents classes that can provide the hash code of a specific type of template-based object.
33  *
34  * @since 2.0
35  *
36  * The %IHashCodeProviderT interface represents classes that can provide the hash code of a specific type of template-based object.
37  *
38  */
39 template< class Type >
40 class IHashCodeProviderT
41 {
42 public:
43         /**
44          * This polymorphic destructor should be overridden if required. @n
45          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
46          *
47          * @since 2.0
48          */
49         virtual ~IHashCodeProviderT(void) {}
50
51         /**
52          * Gets the hash code of the specified object.
53          *
54          * @since 2.0
55          *
56          * @return              The hash code of the specified object
57          * @param[in]   obj A pointer to the object for which the hash code is required
58          * @remarks     The hash algorithm is usually specific to a type. @n
59          *                              Two equal instances must return the same hash value.
60          *                              For better performance, the used hash function must generate a random distribution for all inputs.
61          */
62         virtual int GetHashCode(const Type& obj) const = 0;
63
64 }; // IHashCodeProviderT
65
66 }}} // Tizen::Base::Collection
67
68 #endif // _FBASE_COL_IHASH_CODE_PROVIDER_T_H_