/usr/include/boost/icl
NameSizeModeActions
concept/-0755rm
detail/-0755rm
predicates/-0755rm
type_traits/-0755rm
associative_element_container.hpp8620644editdlrm
associative_interval_container.hpp9970644editdlrm
closed_interval.hpp42520644editdlrm
continuous_interval.hpp71480644editdlrm
discrete_interval.hpp69910644editdlrm
dynamic_interval_traits.hpp13060644editdlrm
functors.hpp164890644editdlrm
gregorian.hpp42250644editdlrm
impl_config.hpp31190644editdlrm
interval.hpp59830644editdlrm
interval_base_map.hpp566990644editdlrm
interval_base_set.hpp225010644editdlrm
interval_bounds.hpp28930644editdlrm
interval_combining_style.hpp9450644editdlrm
interval_map.hpp118720644editdlrm
interval_set.hpp81240644editdlrm
interval_traits.hpp19000644editdlrm
iterator.hpp37420644editdlrm
left_open_interval.hpp45050644editdlrm
map.hpp262820644editdlrm
open_interval.hpp44420644editdlrm
ptime.hpp43170644editdlrm
rational.hpp22190644editdlrm
right_open_interval.hpp44220644editdlrm
separate_interval_set.hpp79280644editdlrm
set.hpp8730644editdlrm
split_interval_map.hpp105930644editdlrm
split_interval_set.hpp86160644editdlrm
Edit: /usr/include/boost/icl/separate_interval_set.hpp (7928B)
/*-----------------------------------------------------------------------------+ Copyright (c) 2007-2009: 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_ICL_SEPARATE_INTERVAL_SET_HPP_JOFA_080608 #define BOOST_ICL_SEPARATE_INTERVAL_SET_HPP_JOFA_080608 #include #include #include #include namespace boost{namespace icl { /** \brief Implements a set as a set of intervals - leaving adjoining intervals separate */ template < typename DomainT, ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, DomainT), ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), ICL_ALLOC Alloc = std::allocator > class separate_interval_set: public interval_base_set, DomainT,Compare,Interval,Alloc> { public: typedef separate_interval_set type; typedef interval_base_set base_type; typedef type overloadable_type; typedef type key_object_type; typedef interval_set joint_type; /// The domain type of the set typedef DomainT domain_type; /// The codomaintype is the same as domain_type typedef DomainT codomain_type; /// The element type of the set typedef DomainT element_type; /// The interval type of the set typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; /// The segment type of the set typedef interval_type segment_type; /// Comparison functor for domain values typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; /// Comparison functor for intervals typedef exclusive_less_than interval_compare; /// Comparison functor for keys typedef exclusive_less_than key_compare; /// The allocator type of the set typedef Alloc allocator_type; /// allocator type of the corresponding element set typedef Alloc domain_allocator_type; /// The corresponding atomized type representing this interval container of elements typedef typename base_type::atomized_type atomized_type; /// Container type for the implementation typedef typename base_type::ImplSetT ImplSetT; /// key type of the implementing container typedef typename ImplSetT::key_type key_type; /// data type of the implementing container typedef typename ImplSetT::value_type data_type; /// value type of the implementing container typedef typename ImplSetT::value_type value_type; /// iterator for iteration over intervals typedef typename ImplSetT::iterator iterator; /// const_iterator for iteration over intervals typedef typename ImplSetT::const_iterator const_iterator; enum { fineness = 2 }; public: //========================================================================== //= Construct, copy, destruct //========================================================================== /// Default constructor for the empty object separate_interval_set(): base_type() {} /// Copy constructor separate_interval_set(const separate_interval_set& src): base_type(src) {} /// Copy constructor for base_type template separate_interval_set (const interval_base_set& src) { this->assign(src); } /// Constructor for a single element explicit separate_interval_set(const domain_type& elem): base_type() { this->add(elem); } /// Constructor for a single interval explicit separate_interval_set(const interval_type& itv): base_type() { this->add(itv); } /// Assignment from a base interval_set. template void assign(const interval_base_set& src) { this->clear(); this->_set.insert(src.begin(), src.end()); } /// Assignment operator for base type template separate_interval_set& operator = (const interval_base_set& src) { this->assign(src); return *this; } # ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES //========================================================================== //= Move semantics //========================================================================== /// Move constructor separate_interval_set(separate_interval_set&& src) : base_type(boost::move(src)) {} /// Move assignment operator separate_interval_set& operator = (separate_interval_set src) { base_type::operator=(boost::move(src)); return *this; } //========================================================================== # else /// Assignment operator separate_interval_set& operator = (const separate_interval_set& src) { base_type::operator=(src); return *this; } # endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES private: // Private functions that shall be accessible by the baseclass: friend class interval_base_set, DomainT,Compare,Interval,Alloc>; iterator handle_inserted(iterator inserted_) { return inserted_; } iterator add_over(const interval_type& addend, iterator last_) { return segmental::join_under(*this, addend, last_); } iterator add_over(const interval_type& addend) { return segmental::join_under(*this, addend); } } ; //----------------------------------------------------------------------------- // type traits //----------------------------------------------------------------------------- template struct is_set > { typedef is_set > type; BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_interval_container > { typedef is_interval_container > type; BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_interval_separator > { typedef is_interval_separator > type; BOOST_STATIC_CONSTANT(bool, value = true); }; //----------------------------------------------------------------------------- // type representation //----------------------------------------------------------------------------- template struct type_to_string > { static std::string apply() { return "se_itv_set<"+ type_to_string::apply() +">"; } }; }} // namespace icl boost #endif