Pair.h revision e507721000647a7d8afe44c63ef7fd04ef8971b1
1/*
2 * Copyright 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef IMG_UTILS_PAIR_H
18#define IMG_UTILS_PAIR_H
19
20#include <cutils/compiler.h>
21
22namespace android {
23namespace img_utils {
24
25/**
26 * Generic pair utility class.  Nothing special here.
27 */
28template<typename F, typename S>
29class ANDROID_API Pair {
30    public:
31        F first;
32        S second;
33
34        Pair() {}
35
36        Pair(const Pair& o) : first(o.first), second(o.second) {}
37
38        Pair(const F& f, const S& s) : first(f), second(s) {}
39};
40
41} /*namespace img_utils*/
42} /*namespace android*/
43
44#endif /*IMG_UTILS_PAIR_H*/
45