Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __CS_UTIL_TUPLE_H__
00020 #define __CS_UTIL_TUPLE_H__
00021
00034 template <typename First, typename Second>
00035 class csTuple2
00036 {
00037 public:
00040 typedef First FirstType;
00043 typedef Second SecondType;
00044
00046 First first;
00048 Second second;
00049
00051 csTuple2 () : first (), second () {}
00053 csTuple2 (const First& first, const Second& second)
00054 : first (first), second (second) {}
00056 template <typename AlFirst, typename AlSecond>
00057 csTuple2 (const csTuple2<AlFirst, AlSecond>& t)
00058 : first (t.first), second (t.second) {}
00059 };
00060
00062 template <typename First, typename Second>
00063 inline csTuple2<First, Second> MakeTuple(First first, Second second)
00064 {
00065 return csTuple2<First, Second> (first, second);
00066 }
00067
00070 #endif // __CS_UTIL_TUPLE_H__