Initial import to Git
[profile/ivi/common-api-dbus-runtime.git] / src / CommonAPI / DBus / DBusFunctionalHash.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 #ifndef COMMONAPI_DBUS_DBUS_FUNCTIONAL_HASH_H_
5 #define COMMONAPI_DBUS_DBUS_FUNCTIONAL_HASH_H_
6
7 #include <functional>
8 #include <string>
9 #include <tuple>
10
11 namespace std {
12
13 template<>
14 struct hash< pair<const char*, const char*> >:
15                 public unary_function< pair<const char*, const char*>, size_t > {
16
17         size_t operator()(const pair<const char*, const char*>& t) const;
18 };
19
20
21 template<>
22 struct hash< pair<string, string> >:
23                 public unary_function< pair<string, string>, size_t > {
24
25         size_t operator()(const pair<string, string>& t) const;
26 };
27
28
29 template<>
30 struct hash< tuple<string, string, string> >:
31                 public unary_function< tuple<string, string, string>, size_t > {
32
33         size_t operator()(const tuple<string, string, string>& t) const;
34 };
35
36
37 template<>
38 struct hash< tuple<string, string, string, string> >:
39                 public std::unary_function< tuple<string, string, string, string>, size_t > {
40
41         size_t operator()(const tuple<string, string, string, string>& t) const;
42 };
43
44
45 template<>
46 struct equal_to< pair<const char*, const char*> >: public binary_function< pair<const char*, const char*>,
47                                                                                                                                                                                                          pair<const char*, const char*>,
48                                                                                                                                                                                                          bool> {
49
50   bool operator()(const pair<const char*, const char*>& a, const pair<const char*, const char*>& b) const;
51 };
52
53 } // namespace std
54
55 #endif // COMMONAPI_DBUS_DBUS_FUNCTIONAL_HASH_H_