SpanItr fetchSpan(int64_t idx){ SpanItr ret=spans.find(idx); if(ret!=spans.end()) return ret; spans.insert(std::pair<int64_t,spanView*>(idx, new spanView(this, idx, nextInterval(idx,timeUnit)))).first; };
// The 'move' commands fetch spans as needed then set leftMostSpan and backLeft. void moveTo(uint64_t idx){ SpanItr ret=spans.find(idx); if(ret!=spans.end()) leftMostSpan=ret; else leftMostSpan=spans.insert(std::pair<int64_t,spanView*>(idx, new spanView(this, idx, nextInterval(idx,timeUnit)))).first; backLeft=0; };