EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | List of all members
Interval Class Reference

A time interval. More...

#include <Interval.h>

Public Member Functions

 Interval ()
 Construct empty Interval. More...
 
 Interval (const epicsTime &start, const epicsTime &end)
 Construct Interval with given start..end. More...
 
const epicsTime & getStart () const
 
const epicsTime & getEnd () const
 
double width () const
 
void clear ()
 Reset Interval to null start and end times. More...
 
void setStart (const epicsTime &time)
 Update start time of Interval. More...
 
void setEnd (const epicsTime &time)
 Update end time of Interval. More...
 
void add (const Interval &other)
 Union; Cause Interval to include the range of the other Interval. More...
 
bool isValid () const
 
bool covers (const Interval &other) const
 Check if this interval 'covers' another one, meaning this interval matches the other one, or starts before and ends after the other one. More...
 
bool operator== (const Interval &other) const
 
bool operator!= (const Interval &other) const
 
bool overlaps (const Interval &other) const
 Check if this and other interval overlap. More...
 
stdString toString () const
 Prints this interval to string.
 

Detailed Description

A time interval.

Constructor & Destructor Documentation

Interval::Interval ( )
inline

Construct empty Interval.

Interval::Interval ( const epicsTime &  start,
const epicsTime &  end 
)
inline

Construct Interval with given start..end.

Member Function Documentation

void Interval::add ( const Interval other)
inline

Union; Cause Interval to include the range of the other Interval.

void Interval::clear ( )
inline

Reset Interval to null start and end times.

bool Interval::covers ( const Interval other) const
inline

Check if this interval 'covers' another one, meaning this interval matches the other one, or starts before and ends after the other one.

Returns
true if this interval fully covers (or matches) other interval.
const epicsTime& Interval::getEnd ( ) const
inline
Returns
End time of Interval.
const epicsTime& Interval::getStart ( ) const
inline
Returns
Start time of Interval.
bool Interval::isValid ( ) const
inline
Returns
true if both start and end time are non-null.
bool Interval::operator!= ( const Interval other) const
inline
Returns
true if this interval differs from other interval.
bool Interval::operator== ( const Interval other) const
inline
Returns
true if this interval matches other interval.
bool Interval::overlaps ( const Interval other) const
inline

Check if this and other interval overlap.

Note: They might touch, e.g. start1 <= end1 <= start2 <= end2, but that's not considered an overlap.

Returns
true if they overlap.
void Interval::setEnd ( const epicsTime &  time)
inline

Update end time of Interval.

void Interval::setStart ( const epicsTime &  time)
inline

Update start time of Interval.

double Interval::width ( ) const
inline
Returns
time range of this interval in seconds.

The documentation for this class was generated from the following file: