$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r82039 - in trunk: boost/polygon libs/polygon/doc libs/polygon/test
From: sydorchuk.andriy_at_[hidden]
Date: 2012-12-16 18:04:25
Author: asydorchuk
Date: 2012-12-16 18:04:23 EST (Sun, 16 Dec 2012)
New Revision: 82039
URL: http://svn.boost.org/trac/boost/changeset/82039
Log:
Polygon: preparing trunk for the release with merge.
Text files modified: 
   trunk/boost/polygon/interval_data.hpp           |    18 +++++------                             
   trunk/boost/polygon/point_data.hpp              |     8 +++--                                   
   trunk/boost/polygon/segment_data.hpp            |    12 +++++++                                 
   trunk/libs/polygon/doc/gtl_interval_concept.htm |    58 +++++++++++++++++++++++---------------  
   trunk/libs/polygon/doc/gtl_point_concept.htm    |    42 ++++++++++++++++-----------             
   trunk/libs/polygon/doc/gtl_segment_concept.htm  |     9 +++--                                   
   trunk/libs/polygon/test/gtl_boost_unit_test.cpp |    59 ----------------------------------------
   7 files changed, 89 insertions(+), 117 deletions(-)
Modified: trunk/boost/polygon/interval_data.hpp
==============================================================================
--- trunk/boost/polygon/interval_data.hpp	(original)
+++ trunk/boost/polygon/interval_data.hpp	2012-12-16 18:04:23 EST (Sun, 16 Dec 2012)
@@ -29,20 +29,12 @@
 #endif
   {}
 
-  interval_data(coordinate_type low, coordinate_type high)
-#ifndef BOOST_POLYGON_MSVC
-    : coords_()
-#endif
-  {
+  interval_data(coordinate_type low, coordinate_type high) {
     coords_[LOW] = low;
     coords_[HIGH] = high;
   }
 
-  interval_data(const interval_data& that)
-#ifndef BOOST_POLYGON_MSVC
-    : coords_()
-#endif
-  {
+  interval_data(const interval_data& that) {
     coords_[0] = that.coords_[0];
     coords_[1] = that.coords_[1];
   }
@@ -53,6 +45,12 @@
     return *this;
   }
 
+  template <typename IntervalType>
+  interval_data& operator=(const IntervalType& that) {
+    assign(*this, that);
+    return *this;
+  }
+
   coordinate_type get(direction_1d dir) const {
     return coords_[dir.to_int()];
   }
Modified: trunk/boost/polygon/point_data.hpp
==============================================================================
--- trunk/boost/polygon/point_data.hpp	(original)
+++ trunk/boost/polygon/point_data.hpp	2012-12-16 18:04:23 EST (Sun, 16 Dec 2012)
@@ -23,7 +23,11 @@
  public:
   typedef T coordinate_type;
 
-  point_data() : coords_() {}
+  point_data()
+#ifndef BOOST_POLYGON_MSVC
+    : coords_()
+#endif
+  {}
 
   point_data(coordinate_type x, coordinate_type y) {
     coords_[HORIZONTAL] = x;
@@ -41,13 +45,11 @@
     return *this;
   }
 
-  // TODO(asydorchuk): Deprecated.
   template <typename PointType>
   explicit point_data(const PointType& that) {
     *this = that;
   }
 
-  // TODO(asydorchuk): Deprecated.
   template <typename PointType>
   point_data& operator=(const PointType& that) {
     assign(*this, that);
Modified: trunk/boost/polygon/segment_data.hpp
==============================================================================
--- trunk/boost/polygon/segment_data.hpp	(original)
+++ trunk/boost/polygon/segment_data.hpp	2012-12-16 18:04:23 EST (Sun, 16 Dec 2012)
@@ -24,7 +24,11 @@
   typedef T coordinate_type;
   typedef point_data<T> point_type;
 
-  segment_data() : points_() {}
+  segment_data()
+#ifndef BOOST_POLYGON_MSVC
+    : points_()
+#endif
+  {}
 
   segment_data(const point_type& low, const point_type& high) {
     points_[LOW] = low;
@@ -42,6 +46,12 @@
     return *this;
   }
 
+  template <typename SegmentType>
+  segment_data& operator=(const SegmentType& that) {
+    assign(*this, that);
+    return *this;
+  }
+
   point_type get(direction_1d dir) const {
     return points_[dir.to_int()];
   }
Modified: trunk/libs/polygon/doc/gtl_interval_concept.htm
==============================================================================
--- trunk/libs/polygon/doc/gtl_interval_concept.htm	(original)
+++ trunk/libs/polygon/doc/gtl_interval_concept.htm	2012-12-16 18:04:23 EST (Sun, 16 Dec 2012)
@@ -7,6 +7,8 @@
 
 
 
+
+
     <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
@@ -464,44 +466,38 @@
                 <td>Assignment operator.</td>
         </tr>
         <tr>
-		<td width="586"><font face="Courier New">template <typename T2><b>  
-		<br /> </b>interval_data& <b>operator=</b>(const T2& that) const</font></td>
+		<td width="586"><font face="Courier New">template <typename IntervalType><b>  
+		<br /> </b>interval_data& <b>operator=</b>(</font><font face="Courier New">const IntervalType</font><font face="Courier New">& that) const</font></td>
                 <td>Assign from an object that is a model of interval.</td>
         </tr>
         <tr>
-		<td width="586"><font face="Courier New">template <typename T2><b> 
-		<br /> </b>bool<b> 
-		operator==</b>(const T2& that) const</font></td>
-		<td>Compare equality to an object that is a model of interval.</td>
+		<td width="586"><font face="Courier New"><b />bool<b> 
+		operator==</b>(const </font><font face="Courier New">interval_data</font><font face="Courier New">& that) const</font></td>
+		<td>Equality operator overload.</td>
         </tr>
         <tr>
-		<td width="586"><font face="Courier New">template <typename T2><b> 
-		<br /> </b>bool<b> 
-		operator!=</b>(const T2& that) const</font></td>
-		<td>Compare inequality to an object that is a model of interval.</td>
+		<td width="586"><font face="Courier New">bool<b> 
+		operator!=</b>(const </font><font face="Courier New">interval_data</font><font face="Courier New">& that) const</font></td>
+		<td>Inequality operator overload.</td>
         </tr>
         <tr>
-		<td width="586"><font face="Courier New">template <typename T2><b> 
-		<br /> </b>bool<b> 
-		operator<</b>(const T2& that) const</font></td>
+		<td width="586"><font face="Courier New">bool<b> 
+		operator<</b>(const </font><font face="Courier New">interval_data</font><font face="Courier New">& that) const</font></td>
                 <td>Compares low coordinates then high coordinates to break ties.</td>
         </tr>
         <tr>
-		<td width="586"><font face="Courier New">template <typename T2><b> 
-		<br /> </b>bool<b> 
-		operator<=</b>(const T2& that) const</font></td>
+		<td width="586"><font face="Courier New">bool<b> 
+		operator<=</b>(const </font><font face="Courier New">interval_data</font><font face="Courier New">& that) const</font></td>
                 <td>Compares low coordinates then high coordinates to break ties.</td>
         </tr>
         <tr>
-		<td width="586"><font face="Courier New">template <typename T2><b> 
-		<br /> </b>bool<b> 
-		operator></b>(const T2& that) const</font></td>
+		<td width="586"><font face="Courier New">bool<b> 
+		operator></b>(const </font><font face="Courier New">interval_data</font><font face="Courier New">& that) const</font></td>
                 <td>Compares low coordinates then high coordinates to break ties.</td>
         </tr>
         <tr>
-		<td width="586"><font face="Courier New">template <typename T2><b> 
-		<br /> </b>bool<b> 
-		operator>=</b>(const T2& that) const</font></td>
+		<td width="586"><font face="Courier New">bool<b> 
+		operator>=</b>(const </font><font face="Courier New">interval_data</font><font face="Courier New">& that) const</font></td>
                 <td>Compares low coordinates then high coordinates to break ties.</td>
         </tr>
         <tr>
@@ -510,10 +506,26 @@
                 <td>Get the coordinate in the given direction.</td>
         </tr>
         <tr>
+            <td style="vertical-align: top;"><font face="Courier New">T <span style="font-weight: bold;">low</span>() const</font></td>
+            <td style="vertical-align: top;">Retrieves the low value.</td>
+          </tr>
+          <tr>
+            <td style="vertical-align: top;"><font face="Courier New">T <span style="font-weight: bold;">high</span>() const</font></td>
+            <td style="vertical-align: top;">Retrieves the high endpoint.</td>
+          </tr>
+<tr>
                 <td width="586"><font face="Courier New">void <b>set</b>(direction_1d 
                 dir, T value)</font></td>
                 <td>Sets the coordinate in the given direction to the value.</td>
-	</tr>
+	</tr><tr>
+            <td style="vertical-align: top;"><font face="Courier New">interval_data& <span style="font-weight: bold;">low</span>(T value)</font></td>
+            <td style="vertical-align: top;">Sets the low value.</td>
+          </tr>
+          <tr>
+            <td style="vertical-align: top;"><font face="Courier New">interval_data& <span style="font-weight: bold;">high</span>(T value)</font></td>
+            <td style="vertical-align: top;">Sets the high value.</td>
+          </tr>
+
         </tbody></table>
         </td></tr><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
Modified: trunk/libs/polygon/doc/gtl_point_concept.htm
==============================================================================
--- trunk/libs/polygon/doc/gtl_point_concept.htm	(original)
+++ trunk/libs/polygon/doc/gtl_point_concept.htm	2012-12-16 18:04:23 EST (Sun, 16 Dec 2012)
@@ -8,6 +8,8 @@
 
 
 
+
+
     <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /><!-- <link type="text/css" rel="stylesheet" href="adobe_source.css"> --></head><body><table style="margin: 0pt; padding: 0pt; width: 100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
 <td style="background-color: rgb(238, 238, 238);" nowrap="1" valign="top">
     <div style="padding: 5px;" align="center">
@@ -86,7 +88,7 @@
 The point concept tag is <font face="Courier New">
 point_concept</font></p><p> 
 To register a user defined type as a model of point concept, specialize the 
-geometry concept meta-function for that type.  In the example below CPoint is registered as a model of 
+geometry concept meta-function for that type.  In the example below <span style="font-family: Courier New,Courier,monospace;">CPoint</span> is registered as a model of 
 point  concept.</p><p> 
 <font face="Courier New">template <><br />
 struct geometry_concept<CPoint> { typedef point_concept type; };</font></p><p> 
@@ -100,7 +102,8 @@
 type modeled more than one concept.</p><p> 
 Below is shown the default point traits.  
 Specialization of these traits is required for types that don't conform to the 
-default behavior.</p><p> 
+default behavior.</p>
+      <p> 
 template <typename T><br />
 struct point_traits {<br />
      typedef typename T::coordinate_type coordinate_type;<br />
@@ -124,15 +127,16 @@
           return T(x_value, y_value);
 <br />
      }<br />
-};</p><p> 
+};</p>
+<p> 
 Example code custom_point.cpp demonstrates 
 how to map a 
                 user defined point class to the library point_concept</p><h2>Functions</h2>
 <table id="table1" border="1" width="100%">
         <tbody><tr>
                 <td width="586"><font face="Courier New">template <typename PointType><br />
-		coordinate_type <b>get</b>(const PointType& point,<br />
-                    orientation_2d)</font></td>
+		coordinate_type <b>get</b>(const PointType& point,<br />                   
+orientation_2d)</font></td>
                 <td>Expects a model of point. Returns 
                 the x or y coordinate of the point, depending on the orientation_2d 
                 value.<br />
@@ -148,14 +152,16 @@
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template <typename PointType><br />PointType <b>construct</b>(coordinate_type x,<br />
-                    coordinate_type y)</font></td>
+                   
+coordinate_type y)</font></td>
                 <td>Construct an object that is a model of point given x and y 
                 coordinate values.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">template <typename PointType1, typename PointType2><br />
                 PointType1& <b>assign</b>(PointType1& left,<br />
-                   const PointType2& right)</font></td>
+                  
+const PointType2& right)</font></td>
                 <td>Copies data from right object that models point into left object 
                 that models point.</td>
         </tr>
@@ -303,7 +309,7 @@
                 coordinates.</td>
         </tr>
         <tr>
-		<td width="586"><font face="Courier New"><b>point_data</b>(const point_data* 
+		<td width="586"><font face="Courier New"><b>point_data</b>(const point_data& 
                 that)</font></td>
                 <td>Copy construct</td>
         </tr>
@@ -313,37 +319,39 @@
                 <td>Assignment operator.</td>
         </tr>
         <tr>
-		<td width="586"><font face="Courier New"><b></b>point_data& <b>operator=</b>(const T& that) const</font></td>
+		<td width="586"><font face="Courier New">template <typename PointType><br />
+point_data& <b>operator=</b>(const PointType& that) const</font></td>
                 <td>Assign from an object that is a model of point.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">bool<b> 
-		operator==</b>(const T& that) const</font></td>
-		<td>Compare equality to an object that is a model of point.</td>
+		operator==</b>(const </font><font face="Courier New">point_data</font><font face="Courier New">& that) const</font></td>
+		<td>Equality operator overload.<br />
+</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">bool<b> 
-		operator!=</b>(const T& that) const</font></td>
-		<td>Compare inequality to an object that is a model of point.</td>
+		operator!=</b>(const </font><font face="Courier New">point_data</font><font face="Courier New">& that) const</font></td>
+		<td>Inequality operator overload.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New"><b> </b>bool<b> 
-		operator<</b>(const T& that) const</font></td>
+		operator<</b>(const </font><font face="Courier New">point_data</font><font face="Courier New">& that) const</font></td>
                 <td>Compares y coordinates then x coordinates to break ties.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New"><b> </b>bool<b> 
-		operator<=</b>(const T& that) const</font></td>
+		operator<=</b>(const </font><font face="Courier New">point_data</font><font face="Courier New">& that) const</font></td>
                 <td>Compares y coordinates then x coordinates to break ties.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New"><b> </b>bool<b> 
-		operator></b>(const T& that) const</font></td>
+		operator></b>(const </font><font face="Courier New">point_data</font><font face="Courier New">& that) const</font></td>
                 <td>Compares low coordinates then high coordinates to break ties.</td>
         </tr>
         <tr>
                 <td width="586"><font face="Courier New">bool<b> 
-		operator>=</b>(const T& that) const</font></td>
+		operator>=</b>(const </font><font face="Courier New">point_data</font><font face="Courier New">& that) const</font></td>
                 <td>Compares low coordinates then high coordinates to break ties.</td>
         </tr>
         <tr>
Modified: trunk/libs/polygon/doc/gtl_segment_concept.htm
==============================================================================
--- trunk/libs/polygon/doc/gtl_segment_concept.htm	(original)
+++ trunk/libs/polygon/doc/gtl_segment_concept.htm	2012-12-16 18:04:23 EST (Sun, 16 Dec 2012)
@@ -1,6 +1,5 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head>
-<!--
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:(null)1="http://www.w3.org/TR/REC-html40" lang="en"><head><!--
     Copyright 2009-2010 Intel Corporation
     license banner
 --><title>Boost Polygon Library: Segment Concept</title>
@@ -18,6 +17,8 @@
 
 
 
+
+
   
 
   
@@ -411,8 +412,8 @@
           </tr>
           <tr>
             <td width="586"><font face="Courier New">template
-<typename Segment><b><br />
-            </b>segment_data& <b>operator=</b>(const Segment& that)
+<typename SegmentType><b><br />
+            </b>segment_data& <b>operator=</b>(const </font><font face="Courier New">SegmentType</font><font face="Courier New">& that)
 const</font></td>
             <td>Assign from an object that is a model of segment.</td>
           </tr>
Modified: trunk/libs/polygon/test/gtl_boost_unit_test.cpp
==============================================================================
--- trunk/libs/polygon/test/gtl_boost_unit_test.cpp	(original)
+++ trunk/libs/polygon/test/gtl_boost_unit_test.cpp	2012-12-16 18:04:23 EST (Sun, 16 Dec 2012)
@@ -733,64 +733,6 @@
 }
 using namespace gtl;
 
-bool testInterval() {
-  interval_data<int> interval(0, 10), interval2(10, 20);
-  if(!abuts(interval, interval2)) return false;
-  if(!boundaries_intersect(interval, interval2)) return false;
-  if(boundaries_intersect(interval, interval2, false)) return false;
-  if(intersect(interval, interval2, false)) return false;
-  if(!intersect(interval, interval2)) return false;
-  if(euclidean_distance(interval, interval2) != 0) return false;
-  encompass(interval, interval2);
-  set(interval, LOW, 0);
-  high(interval, 10);
-  scale(interval, 2.0f);
-  scale(interval, 0.5f);
-  if(low(interval) != 0) return false;
-  if(high(interval) != 10) return false;
-  move(interval, 10);
-  if(!equivalence(interval, interval2)) return false;
-  flip(interval, 10);
-  bloat(interval, -2);
-  shrink(interval, -2);
-  flip(interval, 10);
-  if(!equivalence(interval, interval2)) return false;
-  interval_data<int> half = get_half(interval, LOW);
-  if(high(half) != 15) return false;
-  convolve(interval, interval2);
-  if(high(interval) != 40) return false;
-  deconvolve(interval, interval2);
-  if(!equivalence(interval, interval2)) return false;
-  reflected_convolve(interval, interval2);
-  if(low(interval) != -10) return false;
-  reflected_deconvolve(interval, interval2);
-  if(!equivalence(interval, interval2)) return false;
-  euclidean_distance(interval, 0);
-  move(interval, 20);
-  if(euclidean_distance(interval, interval2) != 10) return false;
-  interval = interval2;
-  move(interval, -5);
-  if(!intersects(interval, interval2)) return false;
-  move(interval, 15);
-  if(!abuts(interval, interval2)) return false;
-  if(abuts(interval, interval2, HIGH)) return false;
-  move(interval, 10);
-  generalized_intersect(interval, interval2);
-  move(interval, -10);
-  if(!equivalence(interval, interval2)) return false;
-  if(get(interval, LOW) != low(interval)) return false;
-  if(get(interval, HIGH) != high(interval)) return false;
-  if(center(interval2) != 15) return false;
-  if(delta(interval2) != 10) return false;
-  assign(interval, interval2);
-  low(interval, 0);
-  if(low(interval) != 0) return false;
-  high(interval, 10);
-  join_with(interval, interval2);
-  if(high(interval) != high(interval2)) return false;
-  return true;
-}
-
 bool testRectangle() {
   rectangle_data<int> rect, rect2;
 #ifdef BOOST_POLYGON_MSVC
@@ -2544,7 +2486,6 @@
   p + pwh;
   p90 + pwh;
   p45 + pwh;
-  std::cout << testInterval() << std::endl;
   std::cout << testRectangle() << std::endl;
   std::cout << testPolygon() << std::endl;
   std::cout << testPropertyMerge() << std::endl;