![]() |
MySQL 9.6.0
Source Code Documentation
|
Holds the start boundary and endpoint boundary of an interval. More...
#include <interval.h>
Public Types | |
| using | Set_traits_t = Set_traits_tp |
| using | Element_t = Set_traits_t::Element_t |
| using | Return_status_t = mysql::utils::Return_status |
Public Types inherited from mysql::sets::detail::Interval_base< Set_traits_tp > | |
| using | Set_traits_t = Set_traits_tp |
| using | Element_t = Set_traits_t::Element_t |
Public Member Functions | |
| Interval () | |
| void | throwing_assign (const Element_t &start_arg, const Element_t &exclusive_end_arg) |
| Set the start and exclusive end to the given values. More... | |
| void | throwing_set_start (const Element_t &start_arg) |
| Set the start to the given value. More... | |
| void | throwing_set_exclusive_end (const Element_t &exclusive_end_arg) |
| Set the exclusive end to the given value. More... | |
| Return_status_t | assign (const Element_t &start_arg, const Element_t &exclusive_end_arg) |
| Set the start and exclusive end to the given values. More... | |
| Return_status_t | set_start (const Element_t &start_arg) |
| Set the start to the given value. More... | |
| Return_status_t | set_exclusive_end (const Element_t &exclusive_end_arg) |
| Set the exclusive end to the given value. More... | |
Public Member Functions inherited from mysql::sets::detail::Interval_base< Set_traits_tp > | |
| constexpr const Element_t & | start () const |
| Return const reference to the starting point of the interval (inclusive). More... | |
| constexpr const Element_t & | exclusive_end () const |
| Return const reference to the exclusive endpoint of the interval. More... | |
Static Public Member Functions | |
| static Interval | throwing_make (const Element_t &start_arg, const Element_t &exclusive_end_arg) |
| Construct an interval with the given values for start and exclusive end. More... | |
| static Interval | throwing_make (const Element_t &singleton) |
| Construct a singleton interval. More... | |
Protected Member Functions | |
| Interval (const Element_t &start_arg, const Element_t &exclusive_end_arg) | |
| Construct an interval with the given values for start and exclusive end. More... | |
| Interval (const Element_t &singleton) | |
| Construct a singleton interval. More... | |
Protected Member Functions inherited from mysql::sets::detail::Interval_base< Set_traits_tp > | |
| constexpr | Interval_base () |
| This is enabled if Set_traits_t are discrete set traits. More... | |
| constexpr | Interval_base (const Element_t &start, const Element_t &exclusive_end) |
| Construct an interval with the given inclusive start and exclusive end. More... | |
| constexpr | Interval_base (Element_t singleton) |
| Construct a singleton interval. More... | |
| void | assign (const Element_t &start_arg, const Element_t &exclusive_end_arg) |
| Set both boundaries to the given values, without validating the range. More... | |
| void | set_start (Element_t start_arg) |
| Set the value for the start boundary, without validating the range. More... | |
| void | set_exclusive_end (Element_t exclusive_end_arg) |
| Set the value for the exclusive_end boundary, without validating the range. More... | |
Private Types | |
| enum class | Check_start { no , yes } |
| Whether assert_consistent needs to check the start boundary. More... | |
| enum class | Check_end { no , yes } |
| Whether assert_consistent needs to check the end boundary. More... | |
| using | Base_t = detail::Interval_base< Set_traits_tp > |
Private Member Functions | |
| template<Check_start check_start = Check_start::yes, Check_end check_end = Check_end::yes> | |
| void | assert_consistent (Element_t start_arg, Element_t exclusive_end_arg) |
| Check that the given values are in range and in order. More... | |
Holds the start boundary and endpoint boundary of an interval.
The endpoint is always exclusive. This class maintains that the boundaries are in range and in order, i.e.:
Set_traits_tp::min() <= start < max_exclusive <= Set_traits_tp::max_exclusive()
The setter functions come in two flavors: one whose name begins with throwing_, which throws an exception if the boundaries are out-of-range or out-of-order; one without the prefix that returns a success status. There are also two factory functions, throwing_make, which create an interval and throws an exception if the boundaries are out-of-range or out-of-order.
| Set_traits_tp | Bounded set traits describing properties of the element type. |
|
private |
| using mysql::sets::Interval< Set_traits_tp >::Element_t = Set_traits_t::Element_t |
| using mysql::sets::Interval< Set_traits_tp >::Return_status_t = mysql::utils::Return_status |
| using mysql::sets::Interval< Set_traits_tp >::Set_traits_t = Set_traits_tp |
|
strongprivate |
|
strongprivate |
|
inlineexplicitprotected |
Construct an interval with the given values for start and exclusive end.
| std::domain_error | if the values are out of range or out of order. |
|
inlineexplicitprotected |
Construct a singleton interval.
| std::domain_error | if the value is out of range. |
|
inline |
|
inlineprivate |
Check that the given values are in range and in order.
| check_start | If yes, check that the start value is in range. |
| check_end | If yes, check that the end value is in range. |
| std::domain_error | if the values are out of range or out of order. |
|
inline |
Set the start and exclusive end to the given values.
|
inline |
Set the exclusive end to the given value.
|
inline |
Set the start to the given value.
|
inline |
Set the start and exclusive end to the given values.
| std::domain_error | if the values are out of range or out of order. |
|
inlinestatic |
Construct a singleton interval.
| std::domain_error | if the value is out of range. |
|
inlinestatic |
Construct an interval with the given values for start and exclusive end.
| std::domain_error | if the values are out of range or out of order. |
|
inline |
Set the exclusive end to the given value.
| std::domain_error | if the value is out of range or out of order. |
|
inline |
Set the start to the given value.
| std::domain_error | if the value is out of range or out of order. |