From 6d0f87ef10dc9f2f0ee1ed8136e0203c4b7c1c9c Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Thu, 17 Jan 2002 17:01:36 +0000 Subject: [PATCH] Changed triple, quadruple -> Triple, Quadruple. --- .../STL_Extension_ref/stl_extension.tex | 32 +++++++------- .../STL_Extension_ref/stl_extension.tex | 32 +++++++------- Packages/STL_Extension/include/CGAL/utility.h | 42 +++++++++---------- .../test/STL_Extension/test_stl_extension.C | 22 +++++----- Packages/STL_Extension/version | 2 +- 5 files changed, 65 insertions(+), 65 deletions(-) diff --git a/Packages/STL_Extension/doc_tex/STL_Extension/STL_Extension_ref/stl_extension.tex b/Packages/STL_Extension/doc_tex/STL_Extension/STL_Extension_ref/stl_extension.tex index 05b06a24a76..65288cda8b2 100644 --- a/Packages/STL_Extension/doc_tex/STL_Extension/STL_Extension_ref/stl_extension.tex +++ b/Packages/STL_Extension/doc_tex/STL_Extension/STL_Extension_ref/stl_extension.tex @@ -1960,9 +1960,9 @@ %% +--------------------------------------------------------+ -\begin{ccRefClass}{triple} +\begin{ccRefClass}{Triple} - \ccDefinition The triple class is an extension of \ccc{std::pair}. + \ccDefinition The Triple class is an extension of \ccc{std::pair}. \ccRefName\ is a heterogeneous triple: it holds one object of type \ccc{T1}, one of type \ccc{T2}, and one of type \ccc{T3}. A \ccRefName\ is much like a container, in that it "owns" its @@ -1995,16 +1995,16 @@ \ccCreation \ccCreationVariable{t} - \ccConstructor{triple();}{introduces a triple using the default + \ccConstructor{Triple();}{introduces a triple using the default constructor of the three elements.} - \ccConstructor{triple(T1 x, T2 y, T3 z);}{constructs a triple such + \ccConstructor{Triple(T1 x, T2 y, T3 z);}{constructs a triple such that \ccc{first} is constructed from \ccc{x}, \ccc{second} is constructed from \ccc{y}, and \ccc{third} is constructed from \ccc{z}.} \ccFunction{template bool - operator<(triple x, triple y);} {The + operator<(Triple x, Triple y);} {The comparison operator. It uses lexicographic comparison: the return value is true if the first element of \ccc{x} is less than the first element of \ccc{y}, and false if the first element of @@ -2018,24 +2018,24 @@ define the comparison operator.} \ccFunction{template bool - operator==(triple x, triple y);} {The + operator==(Triple x, Triple y);} {The equality operator. The return value is true if and only the first elements of \ccc{x} and \ccc{y} are equal, the second elements of \ccc{x} and \ccc{y} are equal, and the third elements of \ccc{x} and \ccc{y} are equal. This operator may only be used if \ccc{T1}, \ccc{T2} and \ccc{T3} define the equality operator.} - \ccFunction{template triple Triple make_triple(T1 x, T2 y, T3 z);} {Equivalent to - \ccStyle{triple(x, y, z)}.} + \ccStyle{Triple(x, y, z)}.} \end{ccRefClass} %% +--------------------------------------------------------+ -\begin{ccRefClass}{quadruple} +\begin{ccRefClass}{Quadruple} - \ccDefinition The quadruple class is an extension of + \ccDefinition The Quadruple class is an extension of \ccc{std::pair}. \ccRefName\ is a heterogeneous quadruple: it holds one object of type \ccc{T1}, one of type \ccc{T2}, one of type \ccc{T3}, and one of type \ccc{T4}. A \ccRefName\ is much like a @@ -2073,17 +2073,17 @@ \ccCreation \ccCreationVariable{t} - \ccConstructor{quadruple();} {introduces a quadruple using the + \ccConstructor{Quadruple();} {introduces a quadruple using the default constructor of the four elements.} - \ccConstructor{quadruple(T1 x, T2 y, T3 z, T4 w);} {constructs a + \ccConstructor{Quadruple(T1 x, T2 y, T3 z, T4 w);} {constructs a quadruple such that \ccc{first} is constructed from \ccc{x}, \ccc{second} is constructed from \ccc{y}, \ccc{third} is constructed from \ccc{z}, and \ccc{fourth} is constructed from \ccc{w}.} \ccFunction{template bool - operator<(quadruple x, quadruple + operator<(Quadruple x, Quadruple y);} {The comparison operator. It uses lexicographic comparison: the return value is true if the first element of \ccc{x} is less than the first element of \ccc{y}, and false if the first element @@ -2100,7 +2100,7 @@ \ccc{T2}, \ccc{T3}, and \ccc{T4} define the comparison operator.} \ccFunction{template bool - operator==(quadruple x, quadruple + operator==(Quadruple x, Quadruple y);} {The equality operator. The return value is true if and only the first elements of \ccc{x} and \ccc{y} are equal, the second elements of \ccc{x} and \ccc{y} are equal, the third elements of @@ -2110,8 +2110,8 @@ operator.} \ccFunction{template - quadruple make_quadruple(T1 x, T2 y, T3 z, T4 w);} - {Equivalent to \ccStyle{quadruple(x, y, z, w)}.} + Quadruple make_quadruple(T1 x, T2 y, T3 z, T4 w);} + {Equivalent to \ccStyle{Quadruple(x, y, z, w)}.} \end{ccRefClass} diff --git a/Packages/STL_Extension/doc_tex/support/STL_Extension/STL_Extension_ref/stl_extension.tex b/Packages/STL_Extension/doc_tex/support/STL_Extension/STL_Extension_ref/stl_extension.tex index 05b06a24a76..65288cda8b2 100644 --- a/Packages/STL_Extension/doc_tex/support/STL_Extension/STL_Extension_ref/stl_extension.tex +++ b/Packages/STL_Extension/doc_tex/support/STL_Extension/STL_Extension_ref/stl_extension.tex @@ -1960,9 +1960,9 @@ %% +--------------------------------------------------------+ -\begin{ccRefClass}{triple} +\begin{ccRefClass}{Triple} - \ccDefinition The triple class is an extension of \ccc{std::pair}. + \ccDefinition The Triple class is an extension of \ccc{std::pair}. \ccRefName\ is a heterogeneous triple: it holds one object of type \ccc{T1}, one of type \ccc{T2}, and one of type \ccc{T3}. A \ccRefName\ is much like a container, in that it "owns" its @@ -1995,16 +1995,16 @@ \ccCreation \ccCreationVariable{t} - \ccConstructor{triple();}{introduces a triple using the default + \ccConstructor{Triple();}{introduces a triple using the default constructor of the three elements.} - \ccConstructor{triple(T1 x, T2 y, T3 z);}{constructs a triple such + \ccConstructor{Triple(T1 x, T2 y, T3 z);}{constructs a triple such that \ccc{first} is constructed from \ccc{x}, \ccc{second} is constructed from \ccc{y}, and \ccc{third} is constructed from \ccc{z}.} \ccFunction{template bool - operator<(triple x, triple y);} {The + operator<(Triple x, Triple y);} {The comparison operator. It uses lexicographic comparison: the return value is true if the first element of \ccc{x} is less than the first element of \ccc{y}, and false if the first element of @@ -2018,24 +2018,24 @@ define the comparison operator.} \ccFunction{template bool - operator==(triple x, triple y);} {The + operator==(Triple x, Triple y);} {The equality operator. The return value is true if and only the first elements of \ccc{x} and \ccc{y} are equal, the second elements of \ccc{x} and \ccc{y} are equal, and the third elements of \ccc{x} and \ccc{y} are equal. This operator may only be used if \ccc{T1}, \ccc{T2} and \ccc{T3} define the equality operator.} - \ccFunction{template triple Triple make_triple(T1 x, T2 y, T3 z);} {Equivalent to - \ccStyle{triple(x, y, z)}.} + \ccStyle{Triple(x, y, z)}.} \end{ccRefClass} %% +--------------------------------------------------------+ -\begin{ccRefClass}{quadruple} +\begin{ccRefClass}{Quadruple} - \ccDefinition The quadruple class is an extension of + \ccDefinition The Quadruple class is an extension of \ccc{std::pair}. \ccRefName\ is a heterogeneous quadruple: it holds one object of type \ccc{T1}, one of type \ccc{T2}, one of type \ccc{T3}, and one of type \ccc{T4}. A \ccRefName\ is much like a @@ -2073,17 +2073,17 @@ \ccCreation \ccCreationVariable{t} - \ccConstructor{quadruple();} {introduces a quadruple using the + \ccConstructor{Quadruple();} {introduces a quadruple using the default constructor of the four elements.} - \ccConstructor{quadruple(T1 x, T2 y, T3 z, T4 w);} {constructs a + \ccConstructor{Quadruple(T1 x, T2 y, T3 z, T4 w);} {constructs a quadruple such that \ccc{first} is constructed from \ccc{x}, \ccc{second} is constructed from \ccc{y}, \ccc{third} is constructed from \ccc{z}, and \ccc{fourth} is constructed from \ccc{w}.} \ccFunction{template bool - operator<(quadruple x, quadruple + operator<(Quadruple x, Quadruple y);} {The comparison operator. It uses lexicographic comparison: the return value is true if the first element of \ccc{x} is less than the first element of \ccc{y}, and false if the first element @@ -2100,7 +2100,7 @@ \ccc{T2}, \ccc{T3}, and \ccc{T4} define the comparison operator.} \ccFunction{template bool - operator==(quadruple x, quadruple + operator==(Quadruple x, Quadruple y);} {The equality operator. The return value is true if and only the first elements of \ccc{x} and \ccc{y} are equal, the second elements of \ccc{x} and \ccc{y} are equal, the third elements of @@ -2110,8 +2110,8 @@ operator.} \ccFunction{template - quadruple make_quadruple(T1 x, T2 y, T3 z, T4 w);} - {Equivalent to \ccStyle{quadruple(x, y, z, w)}.} + Quadruple make_quadruple(T1 x, T2 y, T3 z, T4 w);} + {Equivalent to \ccStyle{Quadruple(x, y, z, w)}.} \end{ccRefClass} diff --git a/Packages/STL_Extension/include/CGAL/utility.h b/Packages/STL_Extension/include/CGAL/utility.h index def22c53ec2..711f31bfd80 100644 --- a/Packages/STL_Extension/include/CGAL/utility.h +++ b/Packages/STL_Extension/include/CGAL/utility.h @@ -23,7 +23,7 @@ // maintainer : Michael Hoffmann // coordinator : ETH // -// STL like utilities (triple and such) +// STL like utilities (Triple and such) // ============================================================================ #ifndef CGAL_UTILITY_H @@ -34,11 +34,11 @@ CGAL_BEGIN_NAMESPACE //+---------------------------------------------------------------------+ -//| triple class | +//| Triple class | //+---------------------------------------------------------------------+ template -struct triple +struct Triple { typedef T1 first_type; typedef T2 second_type; @@ -48,23 +48,23 @@ struct triple T2 second; T3 third; - triple() {} + Triple() {} - triple(const T1& a, const T2& b, const T3& c) + Triple(const T1& a, const T2& b, const T3& c) : first(a), second(b), third(c) {} }; template inline -triple make_triple(const T1& x, const T2& y, const T3& z) +Triple make_triple(const T1& x, const T2& y, const T3& z) { - return triple(x, y, z); + return Triple(x, y, z); } template -inline bool operator==(const triple& x, - const triple& y) +inline bool operator==(const Triple& x, + const Triple& y) { return ( (x.first == y.first) && (x.second == y.second) && @@ -73,8 +73,8 @@ inline bool operator==(const triple& x, template inline -bool operator<(const triple& x, - const triple& y) +bool operator<(const Triple& x, + const Triple& y) { return ( x.first < y.first || ( (x.first == y.first) && (x.second < y.second) ) || @@ -82,11 +82,11 @@ bool operator<(const triple& x, (x.third < y.third) ) ); } //+---------------------------------------------------------------------+ -//| quadruple class | +//| Quadruple class | //+---------------------------------------------------------------------+ template -struct quadruple +struct Quadruple { typedef T1 first_type; typedef T2 second_type; @@ -98,26 +98,26 @@ struct quadruple T3 third; T4 fourth; - quadruple() {} + Quadruple() {} - quadruple(const T1& a, const T2& b, const T3& c, const T4& d) + Quadruple(const T1& a, const T2& b, const T3& c, const T4& d) : first(a), second(b), third(c), fourth(d) {} }; template inline -quadruple +Quadruple make_quadruple(const T1& x, const T2& y, const T3& z, const T4& zz) { - return quadruple(x, y, z, zz); + return Quadruple(x, y, z, zz); } template inline bool -operator==(const quadruple& x, - const quadruple& y) +operator==(const Quadruple& x, + const Quadruple& y) { return ( (x.first == y.first) && (x.second == y.second) && @@ -128,8 +128,8 @@ operator==(const quadruple& x, template inline bool -operator<(const quadruple& x, - const quadruple& y) +operator<(const Quadruple& x, + const Quadruple& y) { return ( x.first < y.first || ( (x.first == y.first) && (x.second < y.second) ) || diff --git a/Packages/STL_Extension/test/STL_Extension/test_stl_extension.C b/Packages/STL_Extension/test/STL_Extension/test_stl_extension.C index 4b64d2c254c..a07a2d91e62 100644 --- a/Packages/STL_Extension/test/STL_Extension/test_stl_extension.C +++ b/Packages/STL_Extension/test/STL_Extension/test_stl_extension.C @@ -8099,11 +8099,11 @@ void test_Oneset_iterator() *g = b; ++g; } -void test_triple() +void test_Triple() { - typedef CGAL::triple T1; - typedef CGAL::triple T2; - typedef CGAL::triple T3; + typedef CGAL::Triple T1; + typedef CGAL::Triple T2; + typedef CGAL::Triple T3; T1 x1; T2 x2; @@ -8121,12 +8121,12 @@ void test_triple() CGAL_assertion(x2 == y2); if (x2 == y2) x3 = z3; } -void test_quadruple() +void test_Quadruple() { - typedef CGAL::quadruple T1; - typedef CGAL::quadruple T2; - typedef CGAL::quadruple T3; - typedef CGAL::quadruple T4; + typedef CGAL::Quadruple T1; + typedef CGAL::Quadruple T2; + typedef CGAL::Quadruple T3; + typedef CGAL::Quadruple T4; T1 x1; T2 x2; @@ -8164,8 +8164,8 @@ int main() { test_Random_access_adaptor(); test_Emptyset_iterator(); test_Oneset_iterator(); - test_triple(); - test_quadruple(); + test_Triple(); + test_Quadruple(); clean_global_data(); return 0; } diff --git a/Packages/STL_Extension/version b/Packages/STL_Extension/version index d920ead9849..1702df2bd85 100644 --- a/Packages/STL_Extension/version +++ b/Packages/STL_Extension/version @@ -1 +1 @@ -2.44 (17 January 2002) +2.45 (17 January 2002)