19 #ifndef LUNCHBOX_INTERVALSET_H 20 #define LUNCHBOX_INTERVALSET_H 46 void insert(
const T& element);
49 void insert(
const T& startElement,
const T& endElement);
55 void erase(
const T& element);
58 void erase(
const T& startElement,
const T& endElement);
67 bool exists(
const T& element)
const;
73 const_iterator
find(
const T& element)
const;
76 const_iterator
begin()
const;
79 const_iterator
end()
const;
88 typedef std::pair<T, bool> Edge;
92 bool operator()(
const Edge& p1,
const Edge& p2)
const 94 if (p1.first < p2.first)
96 if (p1.first == p2.first)
97 return p1.second && !p2.second;
104 typedef std::multiset<Edge, EdgeCompare> EdgeSet;
110 #include "intervalSet.ipp" 112 #endif // LUNCHBOX_INTERVALSET_H Basic type definitions not provided by the operating system.
const_iterator find(const T &element) const
bool exists(const T &element) const
A container to store intervals of elements efficently.
IntervalSet()
Construct a new interval set.
void erase(const T &element)
Remove the given element.
void swap(IntervalSet &rhs)
Swap this container with another one.
void insert(const T &element)
Insert a new element.
const_iterator begin() const
Abstraction layer and common utilities for multi-threaded programming.
const_iterator end() const
void clear()
Remove all stored elements.