|
WSF
|
#include <WsfCoverageAccessInterval.hpp>
Public Member Functions | |
| AccessInterval ()=default | |
| AccessInterval (double aStart, double aEnd) | |
| AccessInterval (const AccessInterval &aOther)=default | |
| AccessInterval & | operator= (const AccessInterval &aOther)=default |
| double | GetStart () const |
| Return the start time of the interval. | |
| double | GetEnd () const |
| Return the end time of the interval. | |
| double | GetDuration () const |
| Get the duration of the interval. | |
| bool | IsValid () const |
| Returns true if this interval have a non-negative duration. | |
| bool | HasStart () const |
| Returns true if this interval has a non-negative start time. | |
| bool | HasEnd () const |
| Returns true if this interval has a non-negative end time. | |
| void | SetStart (double aSimTime) |
Set the start time to the given aSimTime. | |
| void | SetEnd (double aSimTime) |
Set the end time to the given aSimTime. | |
| bool | operator== (const AccessInterval &aOther) const |
| bool | operator!= (const AccessInterval &aOther) const |
| Negated equality operator. | |
| bool | HasOverlapWith (const AccessInterval &aOther) const |
Predicate to determine if this interval overlaps the given aOther. | |
| AccessInterval | UnionWith (const AccessInterval &aOther) const |
| AccessInterval | IntersectionWith (const AccessInterval &aOther) const |
| bool | Contains (double aSimTime) const |
Return true if the given aSimTime is inside this interval. | |
Representation of the simulation times during which an access occurs.
This object uses simulation time to mark the bounds of the interval, so a negative start or end time is invalid, and is used to indicate that those values have not been set.
|
default |
Referenced by AccessInterval(), HasOverlapWith(), IntersectionWith(), operator!=(), operator=(), operator==(), and UnionWith().
|
inline |
|
default |
References AccessInterval().
| bool wsf::coverage::AccessInterval::Contains | ( | double | aSimTime | ) | const |
Return true if the given aSimTime is inside this interval.
|
inline |
Get the duration of the interval.
Referenced by wsf::coverage::AccumulateIntervalDurations().
|
inline |
Return the end time of the interval.
Referenced by wsf::coverage::MeasureUtils::ComputeGaps(), wsf::coverage::MeasureUtils::GetIntervalEndSample(), HasOverlapWith(), IntersectionWith(), and UnionWith().
|
inline |
Return the start time of the interval.
Referenced by wsf::coverage::MeasureUtils::ComputeGaps(), wsf::coverage::MeasureUtils::GetIntervalStartSample(), HasOverlapWith(), IntersectionWith(), and UnionWith().
|
inline |
Returns true if this interval has a non-negative end time.
| bool wsf::coverage::AccessInterval::HasOverlapWith | ( | const AccessInterval & | aOther | ) | const |
Predicate to determine if this interval overlaps the given aOther.
References AccessInterval(), GetEnd(), and GetStart().
Referenced by IntersectionWith(), and UnionWith().
|
inline |
Returns true if this interval has a non-negative start time.
| AccessInterval wsf::coverage::AccessInterval::IntersectionWith | ( | const AccessInterval & | aOther | ) | const |
Return the intersection of this interval with the given aOther.
If the given aOther interval does not overalap with this interval, then this will return an invalid interval.
References AccessInterval(), GetEnd(), GetStart(), HasOverlapWith(), SetEnd(), and SetStart().
|
inline |
Returns true if this interval have a non-negative duration.
|
inline |
Negated equality operator.
References AccessInterval().
|
default |
References AccessInterval().
| bool wsf::coverage::AccessInterval::operator== | ( | const AccessInterval & | aOther | ) | const |
Equality operator.
Intervals are equal if their start and end points are the same.
References AccessInterval().
|
inline |
Set the end time to the given aSimTime.
Referenced by IntersectionWith(), and UnionWith().
|
inline |
Set the start time to the given aSimTime.
Referenced by IntersectionWith(), and UnionWith().
| AccessInterval wsf::coverage::AccessInterval::UnionWith | ( | const AccessInterval & | aOther | ) | const |
Return the union of this interval with the given aOther.
If the given aOther interval does not overalap with this interval, then this will return an invalid interval.
References AccessInterval(), GetEnd(), GetStart(), HasOverlapWith(), SetEnd(), and SetStart().