#include <xtl_region_map.h>
Region map encapsulates private instance of the STL std::map object.
Definition at line 51 of file xtl_region_map.h.
Public Member Functions | |
| xtl_region_map () | |
Default constructor required by node::get_region_none(). | |
| void | adjust (size_t after_offset_, int delta_offset_) |
| Adjusts map of regions accordingly to the specified position and delta. | |
| void | insert (size_t from_offset_, size_t to_offset_) |
| Create new client region. | |
| void | erase (size_t from_offset_, size_t to_offset_) |
| Erase region(s) within the specified region of offsets. | |
| bool | intersection (size_t offset_) const |
| Tests if offset falls inside any region. | |
| size_t | find_not_region (size_t offset_, size_t str_length_) const |
| Calculates lower boundary of intersecting range. | |
| size_t | find_upper_boundary (size_t offset_, size_t str_length_, size_t default_offset_) const |
| Finds upper boundary of next region. | |
| size_t | find_lower_boundary (size_t offset_, size_t str_length_, size_t default_offset_) const |
| Finds lower boundary of next region. | |
| std::pair< size_t, size_t > | find_region (size_t offset_, size_t str_length_, size_t default_offset_) const |
| Finds offset pair corresponding to the next region. | |
| void | clear () |
| Clears region map. | |
| bool | empty () const |
| Returns true if map of regions is empty, false otherwise. | |
| bool | intersection (size_t from_offset_, size_t to_offset_) const |
| Returns true if region specified by two offsets intersects with any existing regions. | |
| bool | contains (size_t from_offset_, size_t to_offset_) const |
| Returns true if region specified by two offsets is contained entirely by an existing region. | |
| template<typename StringT> | |
| StringT | text_difference (StringT const &str_, size_t from_offset_, size_t to_offset_) const |
| Returns substring pointed by two offsets but excludes existing ranges. | |
|
||||||||||||
|
Adjusts map of regions accordingly to the specified position and delta. Adjustments guarantee integrity of regions as long as insertions and deletions are made outside of any existing region.
Definition at line 75 of file xtl_region_map.h. Referenced by policy_mapped_space::region_adjust(), policy_mapped_space::text_insert_go(), and policy_mapped_space::text_insert_stay(). |
|
||||||||||||||||
|
Finds lower boundary of next region.
If no such region exist, function returns Definition at line 281 of file xtl_region_map.h. |
|
||||||||||||
|
Calculates lower boundary of intersecting range.
Definition at line 216 of file xtl_region_map.h. Referenced by policy_mapped_space::lower_bound(). |
|
||||||||||||||||
|
Finds offset pair corresponding to the next region. If specified offset_ is located inside one of the regions, that particular region is chosen. If no such region is found, the function returns a pair of default_offset_ values, provided by the user. (e.g. StringT::npos). Definition at line 311 of file xtl_region_map.h. |
|
||||||||||||||||
|
Finds upper boundary of next region. If specified offset_ is located inside a region, that particular region is chosen, therefore offset returned by this function can be less then the offset_ specified. If no such region exist, function returns default_offset_ provided by the user (such as npos, for example). Definition at line 252 of file xtl_region_map.h. |
|
||||||||||||
|
Create new client region.
Definition at line 112 of file xtl_region_map.h. Referenced by policy_mapped_space::region_insert(). |
|
|
Tests if offset falls inside any region.
Definition at line 179 of file xtl_region_map.h. |
1.3.9.1