Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Class template split_interval_set

boost::icl::split_interval_set — implements a set as a set of intervals - on insertion overlapping intervals are split

Synopsis

// In header: <boost/icl/split_interval_set.hpp>

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 split_interval_set : public boost::icl::interval_base_set< split_interval_set< DomainT, Compare, Interval, Alloc >, DomainT, Compare, Interval, Alloc >
{
public:
  // types
  typedef split_interval_set< DomainT, Compare, Interval, Alloc >      type;                 
  typedef interval_base_set< type, DomainT, Compare, Interval, Alloc > base_type;            
  typedef interval_set< DomainT, Compare, Interval, Alloc >            joint_type;           
  typedef type                                                         overloadable_type;    
  typedef type                                                         key_object_type;      
  typedef DomainT                                                      domain_type;            // The domain type of the set. 
  typedef DomainT                                                      codomain_type;          // The codomaintype is the same as domain_type. 
  typedef DomainT                                                      element_type;           // The element type of the set. 
  typedef interval_type                                                segment_type;           // The segment type of the set. 
  typedef exclusive_less_than< interval_type >                         interval_compare;       // Comparison functor for intervals. 
  typedef exclusive_less_than< interval_type >                         key_compare;            // Comparison functor for keys. 
  typedef Alloc< interval_type >                                       allocator_type;         // The allocator type of the set. 
  typedef Alloc< DomainT >                                             domain_allocator_type;  // allocator type of the corresponding element set 
  typedef base_type::atomized_type                                     atomized_type;          // The corresponding atomized type representing this interval container of elements. 
  typedef base_type::ImplSetT                                          ImplSetT;               // Container type for the implementation. 
  typedef ImplSetT::key_type                                           key_type;               // key type of the implementing container 
  typedef ImplSetT::value_type                                         data_type;              // data type of the implementing container 
  typedef ImplSetT::value_type                                         value_type;             // value type of the implementing container 
  typedef ImplSetT::iterator                                           iterator;               // iterator for iteration over intervals 
  typedef ImplSetT::const_iterator                                     const_iterator;         // const_iterator for iteration over intervals 

  enum @0 { fineness = = 3 };

  // construct/copy/destruct
  split_interval_set();
  split_interval_set(const split_interval_set &);
  template<typename SubType> 
    split_interval_set(const interval_base_set< SubType, DomainT, Compare, Interval, Alloc > &);
  explicit split_interval_set(const interval_type &);
  explicit split_interval_set(const domain_type &);
  split_interval_set(split_interval_set &&);
  template<typename SubType> 
    split_interval_set & 
    operator=(const interval_base_set< SubType, DomainT, Compare, Interval, Alloc > &);
  split_interval_set & operator=(split_interval_set);

  // public member functions
  typedef ICL_INTERVAL_TYPE(Interval, DomainT, Compare);
  typedef ICL_COMPARE_DOMAIN(Compare, DomainT);
  template<typename SubType> 
    void assign(const interval_base_set< SubType, DomainT, Compare, Interval, Alloc > &);

  // private member functions
  iterator handle_inserted(iterator);
  iterator add_over(const interval_type &, iterator);
  iterator add_over(const interval_type &);
};

Description

split_interval_set public construct/copy/destruct

  1. split_interval_set();
    Default constructor for the empty object.
  2. split_interval_set(const split_interval_set & src);
    Copy constructor.
  3. template<typename SubType> 
      split_interval_set(const interval_base_set< SubType, DomainT, Compare, Interval, Alloc > & src);
    Copy constructor for base_type.
  4. explicit split_interval_set(const interval_type & elem);
    Constructor for a single element.
  5. explicit split_interval_set(const domain_type & itv);
    Constructor for a single interval.
  6. split_interval_set(split_interval_set && src);
    Move constructor.
  7. template<typename SubType> 
      split_interval_set & 
      operator=(const interval_base_set< SubType, DomainT, Compare, Interval, Alloc > & src);
    Assignment operator for base type.
  8. split_interval_set & operator=(split_interval_set src);
    Move assignment operator.

split_interval_set public member functions

  1. typedef ICL_INTERVAL_TYPE(Interval, DomainT, Compare);
    The interval type of the set.
  2. typedef ICL_COMPARE_DOMAIN(Compare, DomainT);
    Comparison functor for domain values.
  3. template<typename SubType> 
      void assign(const interval_base_set< SubType, DomainT, Compare, Interval, Alloc > & src);
    Assignment from a base interval_set.

split_interval_set private member functions

  1. iterator handle_inserted(iterator inserted_);
  2. iterator add_over(const interval_type & addend, iterator last_);
  3. iterator add_over(const interval_type & addend);

PrevUpHomeNext