|
vkdb
A time series database engine in C++.
|
A range of data. More...
#include <data_range.h>
Public Types | |
| using | data_type = TData |
Public Member Functions | |
| DataRange () noexcept | |
| Construct a new DataRange object. | |
| DataRange (const data_type &start, const data_type &end) noexcept | |
| Construct a new DataRange object from the given start and end. | |
| DataRange (std::string &&str) | |
| Construct a new DataRange object from the given string. | |
| DataRange (DataRange &&) noexcept=default | |
| Move-construct a DataRange object. | |
| DataRange & | operator= (DataRange &&) noexcept=default |
| Move-assign a DataRange object. | |
| DataRange (const DataRange &) noexcept=default | |
| Copy-construct a DataRange object. | |
| DataRange & | operator= (const DataRange &) noexcept=default |
| Copy-assign a DataRange object. | |
| ~DataRange () noexcept=default | |
| Destroy the DataRange object. | |
| auto | operator<=> (const DataRange &other) const noexcept |
| void | updateRange (const data_type &data) noexcept |
| Update the range with the given data. | |
| bool | inRange (const data_type &data) const noexcept |
| Check if the data is in the range. | |
| bool | overlapsWith (const data_type &start, const data_type &end) const noexcept |
| Check if the range overlaps with the given range. | |
| data_type | lower () const |
| Get the lower bound of the range. | |
| data_type | upper () const |
| Get the upper bound of the range. | |
| void | clear () noexcept |
| Clear the range. | |
| std::string | str () const noexcept |
| Convert the range to a string. | |
A range of data.
| TData | The data type. |
Definition at line 16 of file data_range.h.
| using vkdb::DataRange< TData >::data_type = TData |
Definition at line 18 of file data_range.h.
|
inlinenoexcept |
Construct a new DataRange object.
Definition at line 24 of file data_range.h.
|
inlinenoexcept |
Construct a new DataRange object from the given start and end.
| start | The start of the range. |
| end | The end of the range. |
Definition at line 33 of file data_range.h.
|
inline |
Construct a new DataRange object from the given string.
| str | The string representation of the range. |
| std::invalid_argument | If the range string is invalid. |
Definition at line 43 of file data_range.h.
|
inlinenoexcept |
Clear the range.
Definition at line 183 of file data_range.h.
|
inlinenodiscardnoexcept |
Check if the data is in the range.
| data | The data. |
Definition at line 132 of file data_range.h.
|
inlinenodiscard |
Get the lower bound of the range.
| std::logic_error | If the range is not set. |
Definition at line 158 of file data_range.h.
|
inlinenodiscardnoexcept |
Definition at line 96 of file data_range.h.
|
inlinenodiscardnoexcept |
Check if the range overlaps with the given range.
| start | The start of the range. |
| end | The end of the range. |
Definition at line 144 of file data_range.h.
|
inlinenodiscardnoexcept |
Convert the range to a string.
Definition at line 192 of file data_range.h.
|
inlinenoexcept |
Update the range with the given data.
If the range is not set, the range is set to the data, otherwise the range is updated to include the data.
| data | The data. |
Definition at line 113 of file data_range.h.
|
inlinenodiscard |
Get the upper bound of the range.
| std::logic_error | If the range is not set. |
Definition at line 172 of file data_range.h.