fixed permissions for stlplus files
[chaz/yoink] / src / Moof / stlplus / foursome.tpp
1 ////////////////////////////////////////////////////////////////////////////////
2
3 // Author: Andy Rushton, from an original by Dan Milton
4 // Copyright: (c) Southampton University 1999-2004
5 // (c) Andy Rushton 2004-2009
6 // License: BSD License, see ../docs/license.html
7
8 ////////////////////////////////////////////////////////////////////////////////
9
10 namespace stlplus
11 {
12
13 ////////////////////////////////////////////////////////////////////////////////
14 // the foursome class
15
16 template<typename T1, typename T2, typename T3, typename T4>
17 foursome<T1,T2,T3,T4>::foursome(void) :
18 first(), second(), third(), fourth()
19 {
20 }
21
22 template<typename T1, typename T2, typename T3, typename T4>
23 foursome<T1,T2,T3,T4>::foursome(const T1& p1, const T2& p2, const T3& p3, const T4& p4) :
24 first(p1), second(p2), third(p3), fourth(p4)
25 {
26 }
27
28 template<typename T1, typename T2, typename T3, typename T4>
29 foursome<T1,T2,T3,T4>::foursome(const foursome<T1,T2,T3,T4>& t2) :
30 first(t2.first), second(t2.second), third(t2.third), fourth(t2.fourth)
31 {
32 }
33
34 ////////////////////////////////////////////////////////////////////////////////
35 // creation
36
37 template<typename T1, typename T2, typename T3, typename T4>
38 foursome<T1,T2,T3,T4> make_foursome(const T1& first, const T2& second, const T3& third, const T4& fourth)
39 {
40 return foursome<T1,T2,T3,T4>(first,second,third,fourth);
41 }
42
43 ////////////////////////////////////////////////////////////////////////////////
44 // comparison
45
46 template<typename T1, typename T2, typename T3, typename T4>
47 bool operator == (const foursome<T1,T2,T3,T4>& left, const foursome<T1,T2,T3,T4>& right)
48 {
49 // foursomes are equal if all elements are equal
50 return
51 left.first == right.first &&
52 left.second == right.second &&
53 left.third == right.third &&
54 left.fourth == right.fourth;
55 }
56
57 ////////////////////////////////////////////////////////////////////////////////
58
59 } // end namespace stlplus
This page took 0.033018 seconds and 5 git commands to generate.