Mir
|
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>
Public Types | |
using | ValueType = T |
using | TagType = Tag |
template<typename OtherTag > | |
using | Corresponding = Wrapper< OtherTag > |
Public Member Functions | |
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 |
Protected Attributes | |
T | value |
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.
using mir::geometry::generic::Value< T >::Wrapper< Tag >::Corresponding = Wrapper<OtherTag> |
using mir::geometry::generic::Value< T >::Wrapper< Tag >::TagType = Tag |
using mir::geometry::generic::Value< T >::Wrapper< Tag >::ValueType = T |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineconstexpr |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlinenoexcept |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
protected |
Copyright © 2012-2022
Canonical Ltd.
Generated on Tue Nov 8 21:37:30 UTC 2022
This documentation is licensed under the GPL version 2 or 3.