Class CoverageMap
Defined in File coverage-map.h
Nested Relationships
Nested Types
Class Documentation
-
class CoverageMap
Public Functions
-
CoverageMap()
-
~CoverageMap()
-
bool Merge(uint64_t start, uint64_t end)
Merge the span defined by start and end into the map.
This operation compares the candidate span, defined by "start" and "end", with all spans that exist in the map prior to this call. If the candidate is completely "covered" by all existing spans (that is, it adds nothing new to the aggregate data), then it is "rejected" and the operation returns "false". Otherwise, the collection of spans is modified to accommodate the candidate's contribution and the operation returns "true".
Note
In all existing and candidate spans, "start" must be less than or equal to "end".
- Parameters
start -- Start of the candidate span
end -- End of the candidate span
- Returns
True if the operation resulted in modification of existing spans; false otherwise
-
void Enumerate(std::function<void(uint64_t spanStart, uint64_t spanEnd)> fn) const
Enumerates the existing collection of spans.
- Parameters
fn -- Callback executed for each span
-
CoverageMap()