Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65831 - in sandbox/itl: boost/itl boost/itl/type_traits boost/itl_xt boost/validate/gentor libs/itl/test/fastest_itl_interval_ libs/itl/test/test_itl_interval_ libs/validate/example/labat_single_
From: afojgo_at_[hidden]
Date: 2010-10-08 12:31:12


Author: jofaber
Date: 2010-10-08 12:31:10 EDT (Fri, 08 Oct 2010)
New Revision: 65831
URL: http://svn.boost.org/trac/boost/changeset/65831

Log:
Refactoring: Renaming for left_open/right_open intervals. Stable{msvc-9.0,10.0, gcc-3.4.4}
Added:
   sandbox/itl/boost/itl/left_open_interval.hpp
      - copied unchanged from r65830, /sandbox/itl/boost/itl/leftopen_interval.hpp
   sandbox/itl/boost/itl/right_open_interval.hpp
      - copied unchanged from r65830, /sandbox/itl/boost/itl/rightopen_interval.hpp
Removed:
   sandbox/itl/boost/itl/leftopen_interval.hpp
   sandbox/itl/boost/itl/rightopen_interval.hpp
Text files modified:
   sandbox/itl/boost/itl/interval_base_set.hpp | 2 +-
   sandbox/itl/boost/itl/type_traits/interval_type_default.hpp | 4 ++--
   sandbox/itl/boost/itl_xt/typed_episode.hpp | 2 +-
   sandbox/itl/boost/validate/gentor/randomgentor.hpp | 2 +-
   sandbox/itl/libs/itl/test/fastest_itl_interval_/fastest_itl_interval.cpp | 4 ++--
   sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp | 4 ++--
   sandbox/itl/libs/validate/example/labat_single_/labat_single.cpp | 2 +-
   7 files changed, 10 insertions(+), 10 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 2010-10-08 12:31:10 EDT (Fri, 08 Oct 2010)
@@ -24,7 +24,7 @@
 #include <boost/itl/concept/interval_map.hpp>
 #include <boost/itl/concept/interval_associator.hpp>
 
-#include <boost/itl/rightopen_interval.hpp>
+#include <boost/itl/right_open_interval.hpp>
 #include <boost/itl/continuous_interval.hpp>
 #include <boost/itl/set.hpp>
 #include <boost/itl/detail/notate.hpp>

Deleted: sandbox/itl/boost/itl/leftopen_interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/leftopen_interval.hpp 2010-10-08 12:31:10 EDT (Fri, 08 Oct 2010)
+++ (empty file)
@@ -1,117 +0,0 @@
-/*-----------------------------------------------------------------------------+
-Copyright (c) 2010-2010: Joachim Faulhaber
-+------------------------------------------------------------------------------+
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENCE.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-+-----------------------------------------------------------------------------*/
-#ifndef BOOST_ITL_LEFTOPEN_INTERVAL_HPP_JOFA_100930
-#define BOOST_ITL_LEFTOPEN_INTERVAL_HPP_JOFA_100930
-
-#include <functional>
-#include <boost/concept/assert.hpp>
-#include <boost/itl/type_traits/value_size.hpp>
-#include <boost/itl/type_traits/type_to_string.hpp>
-#include <boost/itl/concept/interval.hpp>
-
-namespace boost{namespace itl
-{
-
-template <class DomainT,
- ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT)>
-class left_open_interval
-{
-public:
- typedef left_open_interval<DomainT,Compare> type;
- typedef DomainT domain_type;
-
-public:
- //==========================================================================
- //= Construct, copy, destruct
- //==========================================================================
- /** Default constructor; yields an empty interval <tt>(0,0]</tt>. */
- left_open_interval()
- : _lwb(identity_element<DomainT>::value()), _upb(identity_element<DomainT>::value())
- {
- BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
- BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
- }
-
- //NOTE: Compiler generated copy constructor is used
-
- /** Constructor for a left-open singleton interval <tt>(val-1,val]</tt> */
- explicit left_open_interval(const DomainT& val)
- : _lwb(pred(val)), _upb(val)
- {
- BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
- BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
- // Only for discrete types this ctor creates an interval containing
- // a single element only.
- BOOST_STATIC_ASSERT((itl::is_discrete<DomainT>::value));
- BOOST_ASSERT((numeric_minimum<DomainT, is_numeric<DomainT>::value >::is_less_than(val) ));
- }
-
- /** Interval from <tt>low</tt> to <tt>up</tt> with bounds <tt>bounds</tt> */
- left_open_interval(const DomainT& low, const DomainT& up) :
- _lwb(low), _upb(up)
- {
- BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
- BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
- }
-
- DomainT lower()const{ return _lwb; }
- DomainT upper()const{ return _upb; }
-
-private:
- DomainT _lwb;
- DomainT _upb;
-};
-
-//==============================================================================
-//=T left_open_interval -> concept intervals
-//==============================================================================
-template<class DomainT, ITL_COMPARE Compare>
-struct interval_traits< itl::left_open_interval<DomainT, Compare> >
-{
- typedef DomainT domain_type;
- typedef ITL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
- typedef itl::left_open_interval<DomainT, Compare> interval_type;
-
- static interval_type construct(const domain_type& lo, const domain_type& up)
- {
- return interval_type(lo, up);
- }
-
- static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); };
- static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); };
-};
-
-
-//==============================================================================
-//= Type traits
-//==============================================================================
-template <class DomainT, ITL_COMPARE Compare>
-struct interval_bound_type< left_open_interval<DomainT,Compare> >
-{
- typedef interval_bound_type type;
- BOOST_STATIC_CONSTANT(unsigned char, value = interval_bounds::static_left_open);
-};
-
-template <class DomainT, ITL_COMPARE Compare>
-struct type_to_string<itl::left_open_interval<DomainT,Compare> >
-{
- static std::string apply()
- { return "(I]<"+ type_to_string<DomainT>::apply() +">"; }
-};
-
-template<class DomainT, ITL_COMPARE Compare>
-struct value_size<itl::left_open_interval<DomainT,Compare> >
-{
- static std::size_t apply(const itl::left_open_interval<DomainT>& value)
- { return 2; }
-};
-
-}} // namespace itl boost
-
-#endif
-

Deleted: sandbox/itl/boost/itl/rightopen_interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/rightopen_interval.hpp 2010-10-08 12:31:10 EDT (Fri, 08 Oct 2010)
+++ (empty file)
@@ -1,116 +0,0 @@
-/*-----------------------------------------------------------------------------+
-Copyright (c) 2010-2010: Joachim Faulhaber
-+------------------------------------------------------------------------------+
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENCE.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-+-----------------------------------------------------------------------------*/
-#ifndef BOOST_ITL_RIGHTOPEN_INTERVAL_HPP_JOFA_100323
-#define BOOST_ITL_RIGHTOPEN_INTERVAL_HPP_JOFA_100323
-
-#include <functional>
-#include <boost/concept/assert.hpp>
-#include <boost/itl/type_traits/value_size.hpp>
-#include <boost/itl/type_traits/type_to_string.hpp>
-#include <boost/itl/concept/interval.hpp>
-
-namespace boost{namespace itl
-{
-
-template <class DomainT,
- ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT)>
-class right_open_interval
-{
-public:
- typedef right_open_interval<DomainT,Compare> type;
- typedef DomainT domain_type;
-
-public:
- //==========================================================================
- //= Construct, copy, destruct
- //==========================================================================
- /** Default constructor; yields an empty interval <tt>[0,0)</tt>. */
- right_open_interval()
- : _lwb(identity_element<DomainT>::value()), _upb(identity_element<DomainT>::value())
- {
- BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
- BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
- }
-
- //NOTE: Compiler generated copy constructor is used
-
- /** Constructor for a singleton interval <tt>[val,val+1)</tt> */
- explicit right_open_interval(const DomainT& val)
- : _lwb(val), _upb(succ(val))
- {
- BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
- BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
- // Only for discrete types this ctor creates an interval containing
- // a single element only.
- BOOST_STATIC_ASSERT((itl::is_discrete<DomainT>::value));
- }
-
- /** Interval from <tt>low</tt> to <tt>up</tt> with bounds <tt>bounds</tt> */
- right_open_interval(const DomainT& low, const DomainT& up) :
- _lwb(low), _upb(up)
- {
- BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>));
- BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>));
- }
-
- domain_type lower()const{ return _lwb; }
- domain_type upper()const{ return _upb; }
-
-private:
- domain_type _lwb;
- domain_type _upb;
-};
-
-//==============================================================================
-//=T right_open_interval -> concept intervals
-//==============================================================================
-template<class DomainT, ITL_COMPARE Compare>
-struct interval_traits< itl::right_open_interval<DomainT, Compare> >
-{
- typedef DomainT domain_type;
- typedef ITL_COMPARE_DOMAIN(Compare,DomainT) domain_compare;
- typedef itl::right_open_interval<DomainT, Compare> interval_type;
-
- static interval_type construct(const domain_type& lo, const domain_type& up)
- {
- return interval_type(lo, up);
- }
-
- static domain_type lower(const interval_type& inter_val){ return inter_val.lower(); };
- static domain_type upper(const interval_type& inter_val){ return inter_val.upper(); };
-};
-
-
-//==============================================================================
-//= Type traits
-//==============================================================================
-template <class DomainT, ITL_COMPARE Compare>
-struct interval_bound_type< right_open_interval<DomainT,Compare> >
-{
- typedef interval_bound_type type;
- BOOST_STATIC_CONSTANT(unsigned char, value = interval_bounds::static_right_open);
-};
-
-template <class DomainT, ITL_COMPARE Compare>
-struct type_to_string<itl::right_open_interval<DomainT,Compare> >
-{
- static std::string apply()
- { return "[I)<"+ type_to_string<DomainT>::apply() +">"; }
-};
-
-template<class DomainT, ITL_COMPARE Compare>
-struct value_size<itl::right_open_interval<DomainT,Compare> >
-{
- static std::size_t apply(const itl::right_open_interval<DomainT>& value)
- { return 2; }
-};
-
-}} // namespace itl boost
-
-#endif
-

Modified: sandbox/itl/boost/itl/type_traits/interval_type_default.hpp
==============================================================================
--- sandbox/itl/boost/itl/type_traits/interval_type_default.hpp (original)
+++ sandbox/itl/boost/itl/type_traits/interval_type_default.hpp 2010-10-08 12:31:10 EDT (Fri, 08 Oct 2010)
@@ -12,8 +12,8 @@
 #include <boost/itl/detail/design_config.hpp>
 #include <boost/itl/continuous_interval.hpp>
 #include <boost/itl/discrete_interval.hpp>
-#include <boost/itl/rightopen_interval.hpp>
-#include <boost/itl/leftopen_interval.hpp>
+#include <boost/itl/right_open_interval.hpp>
+#include <boost/itl/left_open_interval.hpp>
 #include <boost/itl/closed_interval.hpp>
 #include <boost/itl/open_interval.hpp>
 #include <boost/itl/type_traits/is_continuous.hpp>

Modified: sandbox/itl/boost/itl_xt/typed_episode.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/typed_episode.hpp (original)
+++ sandbox/itl/boost/itl_xt/typed_episode.hpp 2010-10-08 12:31:10 EDT (Fri, 08 Oct 2010)
@@ -31,7 +31,7 @@
 #define BOOST_ITL_TYPED_EPISODE_HPP_HPP_JOFA_011015
 
 //JODO #include <boost/itl/interval.hpp>
-#include <boost/itl/rightopen_interval.hpp>
+#include <boost/itl/right_open_interval.hpp>
 #include <boost/itl_xt/ordered_type.hpp>
 
 namespace boost{namespace itl

Modified: sandbox/itl/boost/validate/gentor/randomgentor.hpp
==============================================================================
--- sandbox/itl/boost/validate/gentor/randomgentor.hpp (original)
+++ sandbox/itl/boost/validate/gentor/randomgentor.hpp 2010-10-08 12:31:10 EDT (Fri, 08 Oct 2010)
@@ -26,7 +26,7 @@
 #include <libs/validate/example/labat_polygon_/polygon_gentor.hpp>
 #endif //LAW_BASED_TEST_BOOST_POLYGON
 
-#include <boost/itl/rightopen_interval.hpp>
+#include <boost/itl/right_open_interval.hpp>
 #include <boost/itl/interval_set.hpp>
 #include <boost/itl/separate_interval_set.hpp>
 #include <boost/itl/split_interval_set.hpp>

Modified: sandbox/itl/libs/itl/test/fastest_itl_interval_/fastest_itl_interval.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/fastest_itl_interval_/fastest_itl_interval.cpp (original)
+++ sandbox/itl/libs/itl/test/fastest_itl_interval_/fastest_itl_interval.cpp 2010-10-08 12:31:10 EDT (Fri, 08 Oct 2010)
@@ -26,8 +26,8 @@
 #include "../test_icl_continuous_interval.hpp"
 #include "../test_icl_static_interval.hpp"
 
-#include <boost/itl/rightopen_interval.hpp>
-#include <boost/itl/leftopen_interval.hpp>
+#include <boost/itl/right_open_interval.hpp>
+#include <boost/itl/left_open_interval.hpp>
 #include <boost/itl/closed_interval.hpp>
 #include <boost/itl/open_interval.hpp>
 

Modified: sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp (original)
+++ sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp 2010-10-08 12:31:10 EDT (Fri, 08 Oct 2010)
@@ -29,8 +29,8 @@
 #include "../test_icl_continuous_interval.hpp"
 #include "../test_icl_static_interval.hpp"
 
-#include <boost/itl/rightopen_interval.hpp>
-#include <boost/itl/leftopen_interval.hpp>
+#include <boost/itl/right_open_interval.hpp>
+#include <boost/itl/left_open_interval.hpp>
 #include <boost/itl/closed_interval.hpp>
 #include <boost/itl/open_interval.hpp>
 

Modified: sandbox/itl/libs/validate/example/labat_single_/labat_single.cpp
==============================================================================
--- sandbox/itl/libs/validate/example/labat_single_/labat_single.cpp (original)
+++ sandbox/itl/libs/validate/example/labat_single_/labat_single.cpp 2010-10-08 12:31:10 EDT (Fri, 08 Oct 2010)
@@ -12,7 +12,7 @@
 
 #include <boost/itl/ptime.hpp>
 
-#include <boost/itl/rightopen_interval.hpp>
+#include <boost/itl/right_open_interval.hpp>
 #include <boost/itl/set.hpp>
 #include <boost/itl/map.hpp>
 #include <boost/itl/detail/interval_morphism.hpp>


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