105 const char* s = formattedstr;
106 const char* p = formattedstr;
112 while (*p !=
'\0' && isspace(*p)) { p++; }
113 if (*p ==
'\0') {
return; }
144 os << std::hex <<
"[" <<
m_beg <<
"-" <<
m_end <<
")" << std::dec;
194 DIAG_DevMsgIf(
DBG,
"VMAIntervalSet::insert [begin]\n" 205 return My_t::insert(x);
216 if (it != begin() && (it ==
end() || it->beg() > low)) {
222 if (it->beg() <= low && high <= it->end()) {
228 if (it->beg() <= low) {
229 auto next_it = it; next_it++;
231 if (it->end() >= low) {
232 low = std::min(low, it->beg());
240 while (it !=
end() && it->beg() <= high) {
241 auto next_it = it; next_it++;
242 high = std::max(high, it->end());
265 std::pair<VMAIntervalSet::iterator, VMAIntervalSet::iterator> lu =
289 VMA lb_beg = (lb !=
end()) ? lb->beg() : 0;
290 VMA ub_end = (ub !=
end()) ? ub->end() : 0;
292 if (lb !=
end() && lb->contains(x)) {
295 VMA lb_end = lb->end();
297 if (lb_beg < x.
beg()) {
300 if (lb_end > x.
end()) {
304 else if (lb ==
end() && ub ==
end()) {
310 else if (lb ==
end()) {
313 if ( !(x.
end() < ub->beg()) ) {
316 My_t::erase(begin(), ++end);
317 if (x.
end() < ub_end) {
322 else if (ub ==
end()) {
325 if ( !(lb->end() < x.
beg()) ) {
327 My_t::erase(lb,
end());
328 if (lb_beg < x.
beg()) {
336 if (x.
beg() <= lb->end() && x.
end() < ub->beg()) {
339 if (lb_beg < x.
beg()) {
343 else if (lb->end() < x.
beg() && ub->beg() <= x.
end()) {
347 My_t::erase(++beg, ++end);
348 if (x.
end() < ub_end) {
352 else if ( !(lb->end() < x.
beg() && x.
end() < ub->beg()) ) {
356 My_t::erase(lb, ++end);
377 bool needSeparator =
false;
379 if (needSeparator) {
self +=
" "; }
380 self += (*it).toString();
381 needSeparator =
true;
391 const char* s = formattedstr;
392 const char* p = formattedstr;
395 if (!p || p[0] ==
'\0') {
return; }
404 while ( (p = strchr(q,
'[')) ) {
422 bool needSeparator =
false;
425 if (needSeparator) { os <<
" "; }
427 needSeparator =
true;
VMAInterval(VMA beg, VMA end)
void merge(const VMAIntervalSet &x)
My_t::const_iterator const_iterator
uint64_t toUInt64(const char *str, unsigned *endidx)
string toStr(const int x, int base)
std::ostream & dump(std::ostream &os) const
void erase(const VMA beg, const VMA end)
void fromString(const char *formattedstr)
std::ostream & dump(std::ostream &os) const
std::pair< iterator, bool > insert(const VMA beg, const VMA end)
std::string toString() const
std::pair< VMAIntervalSet::iterator, bool > iteratorPair
const char * DIAG_UnexpectedInput
std::string toString() const
void fromString(const char *formattedstr)