Gazebo Transport

API Reference

11.4.1

The QualifiedTimeRange class provides a pair of qualified times that represent a range. This is used to specify a desired time range to the BasicQueryOptions class. More...

#include <QualifiedTime.hh>

Public Member Functions

 QualifiedTimeRange (const QualifiedTime &_begin, const QualifiedTime &_end)
 Construct a time range. More...
 
 QualifiedTimeRange (const QualifiedTimeRange &_other)
 Copy constructor. More...
 
 QualifiedTimeRange (QualifiedTimeRange &&_old)
 Default move constructor. More...
 
 ~QualifiedTimeRange ()
 Virtual destructor. More...
 
const QualifiedTimeBeginning () const
 Get a reference to the start time of this range. More...
 
const QualifiedTimeEnding () const
 Get a reference to the end time of this range. More...
 
bool operator!= (const QualifiedTimeRange &_other) const
 Inequality operator. More...
 
QualifiedTimeRangeoperator= (const QualifiedTimeRange &_other)
 Copy assignment operator. More...
 
QualifiedTimeRangeoperator= (QualifiedTimeRange &&)=default
 Default move assignment. More...
 
bool operator== (const QualifiedTimeRange &_other) const
 Equality operator. More...
 
bool SetBeginning (const QualifiedTime &_begin)
 Set the start time of this range. Passing in an indeterminate QualifiedTime (its default constructor) will tell this range to have no beginning (effectively, it should start at the beginning of the log). More...
 
bool SetEnding (const QualifiedTime &_end)
 Set the finish time of this range. Passing in an indeterminate QualifiedTime (its default constructor) will tell this range to have no end (effectively, it should not stop until the end of the log). More...
 
bool SetRange (const QualifiedTime &_begin, const QualifiedTime &_end)
 Set both endpoints of the range. More...
 
bool Valid () const
 Check if the range is valid. A valid range means that the finish time is guaranteed to be later than or coincident with the start time. More...
 

Static Public Member Functions

static QualifiedTimeRange AllTime ()
 Construct a time range that has no beginning or end. More...
 
static QualifiedTimeRange From (const QualifiedTime &_begin)
 Construct a time range that begins at _begin and never ends. More...
 
static QualifiedTimeRange Until (const QualifiedTime &_end)
 Construct a time range that ends at _end and has no beginning. More...
 

Detailed Description

The QualifiedTimeRange class provides a pair of qualified times that represent a range. This is used to specify a desired time range to the BasicQueryOptions class.

Constructor & Destructor Documentation

◆ QualifiedTimeRange() [1/3]

QualifiedTimeRange ( const QualifiedTime _begin,
const QualifiedTime _end 
)

Construct a time range.

Parameters
[in]_beginThe beginning of the time range.
[in]_endThe end of the time range.
See also
From()
Until()
AllTime()

◆ QualifiedTimeRange() [2/3]

Copy constructor.

Parameters
[in]_otherAnother QualifiedTimeRange

◆ QualifiedTimeRange() [3/3]

Default move constructor.

Parameters
[in]_oldthe instance being moved into this one

◆ ~QualifiedTimeRange()

Virtual destructor.

Member Function Documentation

◆ AllTime()

static QualifiedTimeRange AllTime ( )
static

Construct a time range that has no beginning or end.

Returns
A time range that has no beginning or end.

◆ Beginning()

const QualifiedTime& Beginning ( ) const

Get a reference to the start time of this range.

Returns
A reference to the start time.

◆ Ending()

const QualifiedTime& Ending ( ) const

Get a reference to the end time of this range.

Returns
A reference to the end time.

◆ From()

static QualifiedTimeRange From ( const QualifiedTime _begin)
static

Construct a time range that begins at _begin and never ends.

Parameters
[in]_beginThe beginning of the time range.
Returns
A time range that begins at _begin and never ends.

◆ operator!=()

bool operator!= ( const QualifiedTimeRange _other) const

Inequality operator.

Parameters
[in]_otherAnother QualifiedTimeRange
Returns
Opposite of operator==(const QualifiedTimeRange &)

◆ operator=() [1/2]

QualifiedTimeRange& operator= ( const QualifiedTimeRange _other)

Copy assignment operator.

Parameters
[in]_otherAnother QualifiedTimeRange
Returns
Reference to this object

◆ operator=() [2/2]

QualifiedTimeRange& operator= ( QualifiedTimeRange &&  )
default

Default move assignment.

Returns
Reference to this object

◆ operator==()

bool operator== ( const QualifiedTimeRange _other) const

Equality operator.

Parameters
[in]_otherAnother QualifiedTimeRange
Returns
true if the time ranges represented by each object are equivalent

◆ SetBeginning()

bool SetBeginning ( const QualifiedTime _begin)

Set the start time of this range. Passing in an indeterminate QualifiedTime (its default constructor) will tell this range to have no beginning (effectively, it should start at the beginning of the log).

Parameters
[in]_beginThe start time of this range.
Returns
True if the new range is valid. False if the range is now invalid. The _begin value will be accepted either way.
See also
SetRange()
Valid()

◆ SetEnding()

bool SetEnding ( const QualifiedTime _end)

Set the finish time of this range. Passing in an indeterminate QualifiedTime (its default constructor) will tell this range to have no end (effectively, it should not stop until the end of the log).

Parameters
[in]_endThe finish time of this range.
Returns
True if this new range is valid. False if the range is now invalid. The _end value will be accepted either way.
See also
SetRange()
Valid()

◆ SetRange()

bool SetRange ( const QualifiedTime _begin,
const QualifiedTime _end 
)

Set both endpoints of the range.

Parameters
[in]_beginThe start time of this range.
[in]_endThe end time of this range.
Returns
True if this new range is valid. False if the range is now invalid. The values for _begin and _end will be accepted either way.
See also
SetBeginning()
SetEnding()
Valid()

◆ Until()

static QualifiedTimeRange Until ( const QualifiedTime _end)
static

Construct a time range that ends at _end and has no beginning.

Parameters
[in]_endThe end of the time range.
Returns
A time range that ends at _end and has no beginning.

◆ Valid()

bool Valid ( ) const

Check if the range is valid. A valid range means that the finish time is guaranteed to be later than or coincident with the start time.

Returns
True if the range is valid, false if invalid.

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