Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51466 - sandbox/itl/boost/itl
From: afojgo_at_[hidden]
Date: 2009-02-27 06:18:24


Author: jofaber
Date: 2009-02-27 06:18:23 EST (Fri, 27 Feb 2009)
New Revision: 51466
URL: http://svn.boost.org/trac/boost/changeset/51466

Log:
Refactored. Replaced IntervalSet template argument types by base class types.

Text files modified:
   sandbox/itl/boost/itl/interval_base_set.hpp | 19 +++++--------------
   sandbox/itl/boost/itl/interval_sets.hpp | 35 +++++++++++++++++++----------------
   2 files changed, 24 insertions(+), 30 deletions(-)

Modified: sandbox/itl/boost/itl/interval_base_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_set.hpp 2009-02-27 06:18:23 EST (Fri, 27 Feb 2009)
@@ -320,13 +320,8 @@
 
     /** The intersection of \c *this and \c operand is erased from \c *this.
         The complemenary elements are added to \c *this. */
- template
- <
- template<class DomT, ITL_COMPARE Comp,
- template<class DomT2,ITL_COMPARE>class Interv, ITL_ALLOC Allc>
- class IntervalSet
- >
- SubType& flip(const IntervalSet<DomainT,Compare,Interval,Alloc>& operand);
+ template<class SubType2>
+ SubType& flip(const interval_base_set<SubType2,DomainT,Compare,Interval,Alloc>& operand);
 
     //==========================================================================
     //= Iterator related
@@ -581,15 +576,11 @@
     class SubType,
     class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc
>
- template
- <
- template<class DomT, ITL_COMPARE Comp, template<class DomT2,ITL_COMPARE>class Interv, ITL_ALLOC Allc>
- class IntervalSet
- >
+ template<class SubType2>
 SubType& interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
- ::flip(const IntervalSet<DomainT,Compare,Interval,Alloc>& operand)
+ ::flip(const interval_base_set<SubType2,DomainT,Compare,Interval,Alloc>& operand)
 {
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> operand_type;
+ typedef interval_base_set<SubType2,DomainT,Compare,Interval,Alloc> operand_type;
 
     if(operand.empty())
         return *that();

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 06:18:23 EST (Fri, 27 Feb 2009)
@@ -75,16 +75,15 @@
 template
 <
     class ObjectT,
- 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 SubType, class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc
>
 ObjectT& operator +=
 (
           ObjectT& object,
- const IntervalSet<DomainT,Compare,Interval,Alloc>& operand
+ const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& operand
 )
 {
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> operand_type;
+ typedef interval_base_set<SubType,DomainT,Compare,Interval,Alloc> operand_type;
     const_FORALL(typename operand_type, elem_, operand)
         object.add(*elem_);
 
@@ -96,18 +95,20 @@
 //-----------------------------------------------------------------------------
 template
 <
- class ObjectT,
- 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 ObjectT,
+ class SubType, class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc
>
 ObjectT& operator -=
-(ObjectT& object, const IntervalSet<DomainT,Compare,Interval,Alloc>& operand)
+(
+ ObjectT& object,
+ const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& operand
+)
 {
- typedef IntervalSet<DomainT,Compare,Interval,Alloc> operand_type;
- const_FORALL(typename operand_type, elem_, operand)
- object.erase(*elem_);
+ typedef interval_base_set<SubType,DomainT,Compare,Interval,Alloc> operand_type;
+ const_FORALL(typename operand_type, elem_, operand)
+ object.erase(*elem_);
 
- return object;
+ return object;
 }
 
 //-----------------------------------------------------------------------------
@@ -115,12 +116,14 @@
 //-----------------------------------------------------------------------------
 template
 <
- class ObjectT,
- 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 ObjectT,
+ class SubType, class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc
>
 ObjectT& operator ^=
- (ObjectT& object, const IntervalSet<DomainT,Compare,Interval,Alloc>& operand)
+(
+ ObjectT& object,
+ const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& operand
+)
 {
     return object.flip(operand);
 }


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