#include <range.h>
Inheritance diagram for Range< T >:


Range object always has a begin and an end (inclusive). Ranges can be compared, merged, and split. The underlying object type used for representing the begin/end values of the range are generally required to be of integer type, but any suitable user-defined type can also be used that satisfies the comparison operations used by this class.
Definition at line 45 of file range.h.
Comparing ranges | |
| template<typename X> | |
| bool | operator< (const Range< X > &x) const |
| template<typename X> | |
| bool | operator> (const Range< X > &x) const |
| template<typename X> | |
| bool | operator== (const Range< X > &x) const |
| template<typename X> | |
| bool | operator!= (const Range< X > &x) const |
| std::ostream & | operator<< (std::ostream &o, const Range &r) |
Public Types | |
| typedef T | size_type |
Public Member Functions | |
Construction | |
| template<typename X, typename Y> | |
| Range (const X &begin, const Y &end) | |
| template<typename X> | |
| Range (const Range< X > &x) | |
| template<typename X, typename Y> | |
| Range (const std::pair< X, Y > r) | |
| Range (std::istream &i) | |
| template<typename X> | |
| Range & | operator= (const Range< X > &x) |
| Range (const T &t) | |
| Constructs lenght=1 range. | |
Accessors | |
| T | begin () const |
| T | end () const |
| T | length () const |
| void | begin (const T &b) |
| void | end (const T &e) |
Operations | |
| template<typename X> | |
| void | merge (const Range< X > &x) |
| Merge another range with current one. | |
| template<typename X> | |
| boost::logic::tribool | erase (Range< X > *x) |
| Erase target range from current one. | |
| template<typename X> | |
| bool | contains (const Range< X > &x) const |
| Check if *this contains. | |
| template<typename X> | |
| bool | contains (const X &x) const |
| Simplified version of the above, this method checks if a given value exists in this range. | |
| template<typename X> | |
| bool | containsFull (const Range< X > &x) const |
| Check if *this completely contains. | |
| template<typename X> | |
| bool | borders (const Range< X > &x) const |
| Check if. | |
Convenience methods for easier usage | |
| template<typename X> | |
| bool | contains (const X &x, const X &y) |
| template<typename X> | |
| bool | containsFull (const X &x, const X &y) |
| template<typename X> | |
| boost::logic::tribool | erase (const X &x, const X &y) |
Private Member Functions | |
| Range () | |
| Default constructor behaviour cannot be defined and is forbidden. | |
Private Attributes | |
| T | m_begin |
| T | m_end |
| begin offset | |
Friends | |
| class | Range |
| end offset Be-friend with all our instances | |
|
|||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
Constructs lenght=1 range.
|
|
|||||||||
|
Default constructor behaviour cannot be defined and is forbidden.
Referenced by Range< uint64_t >::contains(), Range< uint64_t >::containsFull(), and Range< uint64_t >::erase(). |
|
||||||||||
|
|
|
|||||||||
|
Definition at line 107 of file range.h. Referenced by PartData::doGetRange(), Detail::UsedRange::UsedRange(), and Detail::UsedRange::~UsedRange(). |
|
||||||||||||||
|
Check if.
|
|
||||||||||||||||||||
|
|
|
||||||||||||||
|
Simplified version of the above, this method checks if a given value exists in this range.
|
|
||||||||||||||
|
Check if *this contains.
Definition at line 190 of file range.h. Referenced by Range< uint64_t >::contains(), and Range< uint64_t >::erase(). |
|
||||||||||||||||||||
|
|
|
||||||||||||||
|
Check if *this completely contains.
Definition at line 220 of file range.h. Referenced by Range< uint64_t >::containsFull(). |
|
||||||||||
|
|
|
|||||||||
|
Definition at line 108 of file range.h. Referenced by PartData::doGetRange(), PartData::getLock(), PartData::getRange(), Detail::UsedRange::UsedRange(), and Detail::UsedRange::~UsedRange(). |
|
||||||||||||||||||||
|
|
|
||||||||||||||
|
Erase target range from current one.
Definition at line 159 of file range.h. Referenced by Range< uint64_t >::erase(). |
|
|||||||||
|
|
|
||||||||||||||
|
Merge another range with current one.
|
|
||||||||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||||||
|
|
|
||||||||||||||||
|
|
|
|||||
|
end offset Be-friend with all our instances
|
|
|||||
|
Definition at line 268 of file range.h. Referenced by Range< uint64_t >::erase(), Range< uint64_t >::merge(), Range< uint64_t >::operator=(), and Range< uint64_t >::operator==(). |
|
|||||
|
begin offset
Definition at line 269 of file range.h. Referenced by Range< uint64_t >::erase(), Range< uint64_t >::merge(), Range< uint64_t >::operator=(), and Range< uint64_t >::operator==(). |