Ghidra Decompiler Analysis Engine
|
An interval map container. More...
#include <rangemap.hh>
Classes | |
class | PartIterator |
An iterator into the interval map container. More... | |
Public Types | |
typedef _recordtype::linetype | linetype |
Integer data-type defining the linear domain. | |
typedef _recordtype::subsorttype | subsorttype |
The data-type used for subsorting. | |
typedef _recordtype::inittype | inittype |
The data-type containing initialization data for records. | |
typedef PartIterator | const_iterator |
The main sub-range iterator data-type. | |
Public Member Functions | |
std::pair< const_iterator, const_iterator > | find (linetype a) const |
Find sub-ranges intersecting the given boundary point. More... | |
std::pair< const_iterator, const_iterator > | find (linetype a, const subsorttype &subsort1, const subsorttype &subsort2) const |
Find sub-ranges intersecting given boundary point, and between given subsorts. More... | |
const_iterator | find_begin (linetype point) const |
Find beginning of sub-ranges that contain the given boundary point. More... | |
const_iterator | find_end (linetype point) const |
Find ending of sub-ranges that contain the given boundary point. More... | |
const_iterator | find_overlap (linetype point, linetype end) const |
Find first record overlapping given interval. More... | |
std::list< _recordtype >::iterator | insert (const inittype &data, linetype a, linetype b) |
Insert a new record into the container. More... | |
void | erase (typename std::list< _recordtype >::iterator v) |
Erase a given record from the container. More... | |
void | erase (const_iterator iter) |
Erase a record given an iterator. | |
An interval map container.
A container for records occupying (possibly overlapping) intervals. I.e. a map from a linear ordered domain to (multiple) records. The recordtype is the main object in the container, it must support:
The recordtype must define data-types:
linetype is the data-type of elements in the linear domain. It must support:
subsorttype describes how overlapping intervals can be sub-sorted. It must support:
inittype is extra initialization data for the recordtype
The main interval map is implemented as a multiset of disjoint sub-ranges mapping to the recordtype objects. After deduping the sub-ranges form the common refinement of all the possibly overlapping recordtype ranges. A sub-range is duplicated for each distinct recordtype that overlaps that sub-range. The sub-range multiset is updated with every insertion or deletion of recordtype objects into the container, which may insert new or delete existing boundary points separating the disjoint subranges.
void rangemap< _recordtype >::erase | ( | typename std::list< _recordtype >::iterator | v | ) |
Erase a given record from the container.
v | is the iterator to the record to be erased |
std::pair< typename rangemap< _recordtype >::const_iterator, typename rangemap< _recordtype >::const_iterator > rangemap< _recordtype >::find | ( | linetype | point | ) | const |
Find sub-ranges intersecting the given boundary point.
point | is the given boundary point |
std::pair< typename rangemap< _recordtype >::const_iterator, typename rangemap< _recordtype >::const_iterator > rangemap< _recordtype >::find | ( | linetype | point, |
const subsorttype & | sub1, | ||
const subsorttype & | sub2 | ||
) | const |
Find sub-ranges intersecting given boundary point, and between given subsorts.
point | is the given boundary point |
sub1 | is the starting subsort |
sub2 | is the ending subsort |
rangemap< _recordtype >::const_iterator rangemap< _recordtype >::find_begin | ( | linetype | point | ) | const |
Find beginning of sub-ranges that contain the given boundary point.
point | is the given boundary point |
rangemap< _recordtype >::const_iterator rangemap< _recordtype >::find_end | ( | linetype | point | ) | const |
Find ending of sub-ranges that contain the given boundary point.
point | is the given boundary point |
rangemap< _recordtype >::const_iterator rangemap< _recordtype >::find_overlap | ( | linetype | point, |
linetype | end | ||
) | const |
Find first record overlapping given interval.
point | is the start of interval to test |
end | is the end of the interval to test |
std::list< _recordtype >::iterator rangemap< _recordtype >::insert | ( | const inittype & | data, |
linetype | a, | ||
linetype | b | ||
) |
Insert a new record into the container.
data | is other initialization data for the new record |
a | is the start of the range occupied by the new record |
b | is the (inclusive) end of the range |