Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51472 - sandbox/itl/boost/itl
From: afojgo_at_[hidden]
Date: 2009-02-27 09:26:22


Author: jofaber
Date: 2009-02-27 09:26:21 EST (Fri, 27 Feb 2009)
New Revision: 51472
URL: http://svn.boost.org/trac/boost/changeset/51472

Log:
Refactored. Replaced IntervalMap/Set template argument types by base class types.
Stable {msvc-9.0, partly congcc-4.3-a7}

Text files modified:
   sandbox/itl/boost/itl/interval_maps.hpp | 22 ---------------
   sandbox/itl/boost/itl/interval_sets.hpp | 57 ++++++++++++---------------------------
   2 files changed, 18 insertions(+), 61 deletions(-)

Modified: sandbox/itl/boost/itl/interval_maps.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_maps.hpp (original)
+++ sandbox/itl/boost/itl/interval_maps.hpp 2009-02-27 09:26:21 EST (Fri, 27 Feb 2009)
@@ -410,28 +410,6 @@
 //-----------------------------------------------------------------------------
 template
 <
- class DomainT, class CodomainT, class Traits,
- ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template
- <
- class, class, class,
- ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
- >
- class IntervalMap
->
-typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::interval_type
-enclosure(const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object)
-{
- typedef IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> IntervalMapT;
- typedef typename IntervalMapT::interval_type interval_type;
- return
- object.empty() ? neutron<interval_type>::value()
- : (object.begin()->KEY_VALUE)
- .span(object.rbegin()->KEY_VALUE);
-}
-
-template
-<
     class SubType, class DomainT, class CodomainT, class Traits,
     ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc
>

Modified: sandbox/itl/boost/itl/interval_sets.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_sets.hpp (original)
+++ sandbox/itl/boost/itl/interval_sets.hpp 2009-02-27 09:26:21 EST (Fri, 27 Feb 2009)
@@ -26,14 +26,13 @@
 //------------------------------------------------------------------------------
 template
 <
- class SubType, class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
+ class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
+ class LeftIntervalSet, class RightIntervalSet
>
 bool is_element_equal
 (
- const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& left,
- const IntervalSet <DomainT,Compare,Interval,Alloc>& right
+ const interval_base_set<LeftIntervalSet, DomainT,Compare,Interval,Alloc>& left,
+ const interval_base_set<RightIntervalSet,DomainT,Compare,Interval,Alloc>& right
 )
 {
     return Interval_Set::is_element_equal(left, right);
@@ -41,14 +40,13 @@
 
 template
 <
- class SubType, class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
+ class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
+ class LeftIntervalSet, class RightIntervalSet
>
 bool is_element_less
 (
- const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& left,
- const IntervalSet <DomainT,Compare,Interval,Alloc>& right
+ const interval_base_set<LeftIntervalSet, DomainT,Compare,Interval,Alloc>& left,
+ const interval_base_set<RightIntervalSet,DomainT,Compare,Interval,Alloc>& right
 )
 {
     return Interval_Set::is_element_less(left, right);
@@ -56,14 +54,13 @@
 
 template
 <
- class SubType, class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
+ class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
+ class LeftIntervalSet, class RightIntervalSet
>
 bool is_element_greater
 (
- const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& left,
- const IntervalSet <DomainT,Compare,Interval,Alloc>& right
+ const interval_base_set<LeftIntervalSet, DomainT,Compare,Interval,Alloc>& left,
+ const interval_base_set<RightIntervalSet,DomainT,Compare,Interval,Alloc>& right
 )
 {
     return Interval_Set::is_element_greater(left, right);
@@ -135,18 +132,17 @@
 //-----------------------------------------------------------------------------
 template
 <
- class SubType, class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
+ class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
+ class LeftIntervalSet, class RightIntervalSet
>
 bool is_disjoint
 (
- interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& object,
- const IntervalSet <DomainT,Compare,Interval,Alloc>& operand
+ const interval_base_set<LeftIntervalSet, DomainT,Compare,Interval,Alloc>& object,
+ const interval_base_set<RightIntervalSet,DomainT,Compare,Interval,Alloc>& operand
 )
 {
- typedef interval_base_set<SubType,DomainT,Compare,Interval,Alloc> object_type;
- typedef IntervalSet <DomainT,Compare,Interval,Alloc> operand_type;
+ typedef interval_base_set<LeftIntervalSet, DomainT,Compare,Interval,Alloc> object_type;
+ typedef interval_base_set<RightIntervalSet,DomainT,Compare,Interval,Alloc> operand_type;
     object_type intersection;
 
     if(operand.empty())
@@ -213,22 +209,6 @@
 //-----------------------------------------------------------------------------
 template
 <
- class DomainT,
- ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
- template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-typename IntervalSet<DomainT,Compare,Interval,Alloc>::interval_type
-enclosure(const IntervalSet<DomainT,Compare,Interval,Alloc>& object)
-{
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> IntervalSetT;
- typedef typename IntervalSetT::interval_type interval_type;
- return
- object.empty() ? neutron<interval_type>::value()
- : (*object.begin()).span(*object.rbegin());
-}
-
-template
-<
     class SubType, class DomainT,
     ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc
>
@@ -243,7 +223,6 @@
 }
 
 
-
 }} // namespace itl boost
 
 #endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk