|
libdballe
7.7
|
Range of datetimes. More...
#include <types.h>
Public Member Functions | |
| DatetimeRange (const Datetime &min, const Datetime &max) | |
| DatetimeRange (int yemin, int momin, int damin, int homin, int mimin, int semin, int yemax, int momax, int damax, int homax, int mimax, int semax) | |
| bool | is_missing () const |
| Check if this range is open on both sides. | |
| bool | operator== (const DatetimeRange &dtr) const |
| bool | operator!= (const DatetimeRange &dtr) const |
| void | set (const Datetime &min, const Datetime &max) |
| Set the extremes. | |
| void | set (int yemin, int momin, int damin, int homin, int mimin, int semin, int yemax, int momax, int damax, int homax, int mimax, int semax) |
| Set the extremes from broken down components. More... | |
| void | merge (const DatetimeRange &range) |
| Merge range into this one, resulting in the smallest range that contains both. | |
| bool | contains (const Datetime &dt) const |
| Check if a Datetime is inside this range. | |
| bool | contains (const DatetimeRange &dtr) const |
| Check if a range is inside this range (extremes included) | |
| bool | is_disjoint (const DatetimeRange &dtr) const |
| Check if the two ranges are completely disjoint. | |
Data Fields | |
| Datetime | min |
| Lower bound of the range. | |
| Datetime | max |
| Upper bound of the range. | |
Range of datetimes.
The range includes the extremes. A missing extreme in the range means an open ended range.
| void dballe::DatetimeRange::set | ( | int | yemin, |
| int | momin, | ||
| int | damin, | ||
| int | homin, | ||
| int | mimin, | ||
| int | semin, | ||
| int | yemax, | ||
| int | momax, | ||
| int | damax, | ||
| int | homax, | ||
| int | mimax, | ||
| int | semax | ||
| ) |
Set the extremes from broken down components.
If yemin or yemax are MISSING_INT, they are taken as an open ended range boundary.
If any other *min values are MISSING_INT, they are filled with the lowest possible valid value they can have.
If any other *max values are MISSING_INT, they are filled with the highest possible valid value they can have.
1.8.9.1