Wraps a geometry value and prevents it from being accidentally used for invalid operations (such as setting a width to a height or adding two x positions together). Of course, explicit casts are possible to get around these restrictions (see the as_*() functions). int values (which are most values) should use the derived IntWrapper class, and other types should use this directly.
More...
#include <dimensions_generic.h>
|
template<typename Q = T> |
constexpr std::enable_if< std::is_integral< Q >::value, int >::type | as_int () const |
|
constexpr T | as_value () const noexcept |
|
constexpr | Wrapper () noexcept |
|
Wrapper & | operator= (Wrapper const &that) noexcept |
|
constexpr | Wrapper (Wrapper const &that) noexcept |
|
template<typename W , typename std::enable_if< std::is_same< typename W::TagType, Tag >::value, bool >::type = true> |
constexpr | Wrapper (W const &value) noexcept |
|
template<typename U , typename std::enable_if< std::is_scalar< U >::value, bool >::type = true> |
constexpr | Wrapper (U const &value) noexcept |
|
constexpr auto | operator== (Wrapper< Tag > const &rhs) const -> bool |
|
constexpr auto | operator!= (Wrapper< Tag > const &rhs) const -> bool |
|
constexpr auto | operator<= (Wrapper< Tag > const &rhs) const -> bool |
|
constexpr auto | operator>= (Wrapper< Tag > const &rhs) const -> bool |
|
constexpr auto | operator< (Wrapper< Tag > const &rhs) const -> bool |
|
constexpr auto | operator> (Wrapper< Tag > const &rhs) const -> bool |
|
template<typename T>
template<typename Tag>
struct mir::geometry::generic::Value< T >::Wrapper< Tag >
Wraps a geometry value and prevents it from being accidentally used for invalid operations (such as setting a width to a height or adding two x positions together). Of course, explicit casts are possible to get around these restrictions (see the as_*() functions). int values (which are most values) should use the derived IntWrapper class, and other types should use this directly.
◆ Corresponding
template<typename T >
template<typename Tag >
template<typename OtherTag >
◆ TagType
template<typename T >
template<typename Tag >
◆ ValueType
template<typename T >
template<typename Tag >
◆ Wrapper() [1/4]
template<typename T >
template<typename Tag >
◆ Wrapper() [2/4]
template<typename T >
template<typename Tag >
◆ Wrapper() [3/4]
template<typename T >
template<typename Tag >
template<typename W , typename std::enable_if< std::is_same< typename W::TagType, Tag >::value, bool >::type = true>
|
inlineexplicitconstexprnoexcept |
◆ Wrapper() [4/4]
template<typename T >
template<typename Tag >
template<typename U , typename std::enable_if< std::is_scalar< U >::value, bool >::type = true>
|
inlineexplicitconstexprnoexcept |
◆ as_int()
template<typename T >
template<typename Tag >
template<typename Q = T>
◆ as_value()
template<typename T >
template<typename Tag >
◆ operator!=()
template<typename T >
template<typename Tag >
◆ operator<()
template<typename T >
template<typename Tag >
◆ operator<=()
template<typename T >
template<typename Tag >
◆ operator=()
template<typename T >
template<typename Tag >
◆ operator==()
template<typename T >
template<typename Tag >
◆ operator>()
template<typename T >
template<typename Tag >
◆ operator>=()
template<typename T >
template<typename Tag >
◆ value
template<typename T >
template<typename Tag >
The documentation for this struct was generated from the following file:
Copyright © 2012-2021
Canonical Ltd.
Generated on Sat Aug 7 00:05:17 UTC 2021
This documentation is licensed under the GPL version 2 or 3.