LocARNA-1.9.2
|
00001 #ifndef LOCARNA_TUPLES_HH 00002 #define LOCARNA_TUPLES_HH 00003 00004 #ifdef HAVE_CONFIG_H 00005 #include <config.h> 00006 #endif 00007 00008 namespace LocARNA { 00009 00016 template <class T1, class T2, class T3> 00017 class triple : public std::pair<T1, T2> { 00018 public: 00019 T3 third; 00020 00029 triple(const T1 &x1, const T2 &x2, const T3 &x3) 00030 : std::pair<T1, T2>(x1, x2), third(x3) {} 00031 }; 00032 00039 template <class T1, class T2, class T3, class T4> 00040 class quadruple : public triple<T1, T2, T3> { 00041 public: 00042 T4 fourth; 00043 00053 quadruple(const T1 &x1, const T2 &x2, const T3 &x3, const T4 &x4) 00054 : triple<T1, T2, T3>(x1, x2, x3), fourth(x4) {} 00055 }; 00056 00063 template <class T1, class T2, class T3, class T4, class T5> 00064 class quintuple : public quadruple<T1, T2, T3, T4> { 00065 public: 00066 T5 fifth; 00067 00078 quintuple(const T1 &x1, 00079 const T2 &x2, 00080 const T3 &x3, 00081 const T4 &x4, 00082 const T5 &x5) 00083 : quadruple<T1, T2, T3, T4>(x1, x2, x3, x4), fifth(x5) {} 00084 }; 00085 00086 } // end namespace LocARNA 00087 00088 #endif // LOCARNA_TUPLES_HH