fixed permissions for stlplus files
[chaz/yoink] / src / Moof / stlplus / triple.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 triple class
15
16 template<typename T1, typename T2, typename T3>
17 triple<T1,T2,T3>::triple(void) :
18 first(), second(), third()
19 {
20 }
21
22 template<typename T1, typename T2, typename T3>
23 triple<T1,T2,T3>::triple(const T1& p1, const T2& p2, const T3& p3) :
24 first(p1), second(p2), third(p3)
25 {
26 }
27
28 template<typename T1, typename T2, typename T3>
29 triple<T1,T2,T3>::triple(const triple<T1,T2,T3>& t2) :
30 first(t2.first), second(t2.second), third(t2.third)
31 {
32 }
33
34 ////////////////////////////////////////////////////////////////////////////////
35 // creation
36
37 template<typename T1, typename T2, typename T3>
38 triple<T1,T2,T3> make_triple(const T1& first, const T2& second, const T3& third)
39 {
40 return triple<T1,T2,T3>(first,second,third);
41 }
42
43 ////////////////////////////////////////////////////////////////////////////////
44 // comparison
45
46 template<typename T1, typename T2, typename T3>
47 bool operator == (const triple<T1,T2,T3>& left, const triple<T1,T2,T3>& right)
48 {
49 // triples are equal if all elements are equal
50 return left.first == right.first && left.second == right.second && left.third == right.third;
51 }
52
53 ////////////////////////////////////////////////////////////////////////////////
54
55 } // end namespace stlplus
56
This page took 0.035665 seconds and 4 git commands to generate.