Mir
Classes | Typedefs | Functions
mir::geometry::generic Namespace Reference

Classes

struct  Value
 
struct  Point
 
struct  Size
 
struct  Displacement
 
struct  Rectangle
 

Typedefs

template<class GeometricType , typename Tag >
using Corresponding = typename GeometricType::template Corresponding< Tag >
 
template<typename T >
using Width = typename Value< T >::template Wrapper< WidthTag >
 
template<typename T >
using Height = typename Value< T >::template Wrapper< HeightTag >
 
template<typename T >
using X = typename Value< T >::template Wrapper< XTag >
 
template<typename T >
using Y = typename Value< T >::template Wrapper< YTag >
 
template<typename T >
using DeltaX = typename Value< T >::template Wrapper< DeltaXTag >
 
template<typename T >
using DeltaY = typename Value< T >::template Wrapper< DeltaYTag >
 

Functions

template<typename W , typename std::enable_if< std::is_base_of< detail::ValueWrapperBase, W >::value, bool >::type = true>
std::ostream & operator<< (std::ostream &out, W const &value)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr bool operator== (D const &lhs, D const &rhs)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr bool operator!= (D const &lhs, D const &rhs)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
std::ostream & operator<< (std::ostream &out, D const &value)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D operator+ (D const &lhs, D const &rhs)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D operator- (D const &lhs, D const &rhs)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D operator- (D const &rhs)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::PointType operator+ (typename D::PointType const &lhs, D const &rhs)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::PointType operator+ (D const &lhs, typename D::PointType const &rhs)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::PointType operator- (typename D::PointType const &lhs, D const &rhs)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P::DisplacementType operator- (P const &lhs, P const &rhs)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::PointType & operator+= (typename D::PointType &lhs, D const &rhs)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::PointType & operator-= (typename D::PointType &lhs, D const &rhs)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
bool operator< (D const &lhs, D const &rhs)
 
template<typename Scalar , typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D operator* (Scalar scale, D const &disp)
 
template<typename Scalar , typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D operator* (D const &disp, Scalar scale)
 
template<typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr S::DisplacementType as_displacement (S const &size)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::SizeType as_size (D const &disp)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P::DisplacementType as_displacement (P const &point)
 
template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::PointType as_point (D const &disp)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr bool operator== (P const &lhs, P const &rhs)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr bool operator!= (P const &lhs, P const &rhs)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P operator+ (P lhs, Corresponding< P, DeltaXTag > rhs)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P operator+ (P lhs, Corresponding< P, DeltaYTag > rhs)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P operator- (P lhs, Corresponding< P, DeltaXTag > rhs)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P operator- (P lhs, Corresponding< P, DeltaYTag > rhs)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
P & operator+= (P &lhs, Corresponding< P, DeltaXTag > rhs)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
P & operator+= (P &lhs, Corresponding< P, DeltaYTag > rhs)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
P & operator-= (P &lhs, Corresponding< P, DeltaXTag > rhs)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
P & operator-= (P &lhs, Corresponding< P, DeltaYTag > rhs)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
std::ostream & operator<< (std::ostream &out, P const &value)
 
template<typename R , typename std::enable_if< std::is_base_of< detail::RectangleBase, R >::value, bool >::type = true>
intersection_of (R const &a, R const &b)
 
template<typename P , typename S >
constexpr bool operator== (Rectangle< P, S > const &lhs, Rectangle< P, S > const &rhs)
 
template<typename P , typename S >
constexpr bool operator!= (Rectangle< P, S > const &lhs, Rectangle< P, S > const &rhs)
 
template<typename P , typename S >
std::ostream & operator<< (std::ostream &out, Rectangle< P, S > const &value)
 
template<typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr bool operator== (S const &lhs, S const &rhs)
 
template<typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr bool operator!= (S const &lhs, S const &rhs)
 
template<typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
std::ostream & operator<< (std::ostream &out, S const &value)
 
template<typename Scalar , typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr S operator* (Scalar scale, S const &size)
 
template<typename Scalar , typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr S operator* (S const &size, Scalar scale)
 
template<typename Scalar , typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr S operator/ (S const &size, Scalar scale)
 
template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P::SizeType as_size (P const &point)
 
template<typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr S::PointType as_point (S const &size)
 

Typedef Documentation

◆ Corresponding

template<class GeometricType , typename Tag >
using mir::geometry::generic::Corresponding = typedef typename GeometricType::template Corresponding<Tag>

◆ DeltaX

template<typename T >
using mir::geometry::generic::DeltaX = typedef typename Value<T>::template Wrapper<DeltaXTag>

◆ DeltaY

template<typename T >
using mir::geometry::generic::DeltaY = typedef typename Value<T>::template Wrapper<DeltaYTag>

◆ Height

template<typename T >
using mir::geometry::generic::Height = typedef typename Value<T>::template Wrapper<HeightTag>

◆ Width

template<typename T >
using mir::geometry::generic::Width = typedef typename Value<T>::template Wrapper<WidthTag>

◆ X

template<typename T >
using mir::geometry::generic::X = typedef typename Value<T>::template Wrapper<XTag>

◆ Y

template<typename T >
using mir::geometry::generic::Y = typedef typename Value<T>::template Wrapper<YTag>

Function Documentation

◆ as_displacement() [1/2]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P::DisplacementType mir::geometry::generic::as_displacement ( P const &  point)
inlineconstexpr

◆ as_displacement() [2/2]

template<typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr S::DisplacementType mir::geometry::generic::as_displacement ( S const &  size)
inlineconstexpr

◆ as_point() [1/2]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::PointType mir::geometry::generic::as_point ( D const &  disp)
inlineconstexpr

◆ as_point() [2/2]

template<typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr S::PointType mir::geometry::generic::as_point ( S const &  size)
inlineconstexpr

◆ as_size() [1/2]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::SizeType mir::geometry::generic::as_size ( D const &  disp)
inlineconstexpr

◆ as_size() [2/2]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P::SizeType mir::geometry::generic::as_size ( P const &  point)
inlineconstexpr

◆ intersection_of()

template<typename R , typename std::enable_if< std::is_base_of< detail::RectangleBase, R >::value, bool >::type = true>
R mir::geometry::generic::intersection_of ( R const &  a,
R const &  b 
)

◆ operator!=() [1/4]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr bool mir::geometry::generic::operator!= ( D const &  lhs,
D const &  rhs 
)
inlineconstexpr

◆ operator!=() [2/4]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr bool mir::geometry::generic::operator!= ( P const &  lhs,
P const &  rhs 
)
inlineconstexpr

◆ operator!=() [3/4]

template<typename P , typename S >
constexpr bool mir::geometry::generic::operator!= ( Rectangle< P, S > const &  lhs,
Rectangle< P, S > const &  rhs 
)
inlineconstexpr

◆ operator!=() [4/4]

template<typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr bool mir::geometry::generic::operator!= ( S const &  lhs,
S const &  rhs 
)
inlineconstexpr

◆ operator*() [1/4]

template<typename Scalar , typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D mir::geometry::generic::operator* ( D const &  disp,
Scalar  scale 
)
inlineconstexpr

◆ operator*() [2/4]

template<typename Scalar , typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr S mir::geometry::generic::operator* ( S const &  size,
Scalar  scale 
)
inlineconstexpr

◆ operator*() [3/4]

template<typename Scalar , typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D mir::geometry::generic::operator* ( Scalar  scale,
D const &  disp 
)
inlineconstexpr

◆ operator*() [4/4]

template<typename Scalar , typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr S mir::geometry::generic::operator* ( Scalar  scale,
S const &  size 
)
inlineconstexpr

◆ operator+() [1/5]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D mir::geometry::generic::operator+ ( D const &  lhs,
D const &  rhs 
)
inlineconstexpr

◆ operator+() [2/5]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::PointType mir::geometry::generic::operator+ ( D const &  lhs,
typename D::PointType const &  rhs 
)
inlineconstexpr

◆ operator+() [3/5]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P mir::geometry::generic::operator+ ( lhs,
Corresponding< P, DeltaXTag rhs 
)
inlineconstexpr

◆ operator+() [4/5]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P mir::geometry::generic::operator+ ( lhs,
Corresponding< P, DeltaYTag rhs 
)
inlineconstexpr

◆ operator+() [5/5]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::PointType mir::geometry::generic::operator+ ( typename D::PointType const &  lhs,
D const &  rhs 
)
inlineconstexpr

◆ operator+=() [1/3]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
P& mir::geometry::generic::operator+= ( P &  lhs,
Corresponding< P, DeltaXTag rhs 
)
inline

◆ operator+=() [2/3]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
P& mir::geometry::generic::operator+= ( P &  lhs,
Corresponding< P, DeltaYTag rhs 
)
inline

◆ operator+=() [3/3]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::PointType& mir::geometry::generic::operator+= ( typename D::PointType &  lhs,
D const &  rhs 
)
inlineconstexpr

◆ operator-() [1/6]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D mir::geometry::generic::operator- ( D const &  lhs,
D const &  rhs 
)
inlineconstexpr

◆ operator-() [2/6]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D mir::geometry::generic::operator- ( D const &  rhs)
inlineconstexpr

◆ operator-() [3/6]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P::DisplacementType mir::geometry::generic::operator- ( P const &  lhs,
P const &  rhs 
)
inlineconstexpr

◆ operator-() [4/6]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P mir::geometry::generic::operator- ( lhs,
Corresponding< P, DeltaXTag rhs 
)
inlineconstexpr

◆ operator-() [5/6]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr P mir::geometry::generic::operator- ( lhs,
Corresponding< P, DeltaYTag rhs 
)
inlineconstexpr

◆ operator-() [6/6]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::PointType mir::geometry::generic::operator- ( typename D::PointType const &  lhs,
D const &  rhs 
)
inlineconstexpr

◆ operator-=() [1/3]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
P& mir::geometry::generic::operator-= ( P &  lhs,
Corresponding< P, DeltaXTag rhs 
)
inline

◆ operator-=() [2/3]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
P& mir::geometry::generic::operator-= ( P &  lhs,
Corresponding< P, DeltaYTag rhs 
)
inline

◆ operator-=() [3/3]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr D::PointType& mir::geometry::generic::operator-= ( typename D::PointType &  lhs,
D const &  rhs 
)
inlineconstexpr

◆ operator/()

template<typename Scalar , typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr S mir::geometry::generic::operator/ ( S const &  size,
Scalar  scale 
)
inlineconstexpr

◆ operator<()

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
bool mir::geometry::generic::operator< ( D const &  lhs,
D const &  rhs 
)
inline

◆ operator<<() [1/5]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
std::ostream& mir::geometry::generic::operator<< ( std::ostream &  out,
D const &  value 
)

◆ operator<<() [2/5]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
std::ostream& mir::geometry::generic::operator<< ( std::ostream &  out,
P const &  value 
)

◆ operator<<() [3/5]

template<typename P , typename S >
std::ostream& mir::geometry::generic::operator<< ( std::ostream &  out,
Rectangle< P, S > const &  value 
)

◆ operator<<() [4/5]

template<typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
std::ostream& mir::geometry::generic::operator<< ( std::ostream &  out,
S const &  value 
)

◆ operator<<() [5/5]

template<typename W , typename std::enable_if< std::is_base_of< detail::ValueWrapperBase, W >::value, bool >::type = true>
std::ostream& mir::geometry::generic::operator<< ( std::ostream &  out,
W const &  value 
)

◆ operator==() [1/4]

template<typename D , typename std::enable_if< std::is_base_of< detail::DisplacementBase, D >::value, bool >::type = true>
constexpr bool mir::geometry::generic::operator== ( D const &  lhs,
D const &  rhs 
)
inlineconstexpr

◆ operator==() [2/4]

template<typename P , typename std::enable_if< std::is_base_of< detail::PointBase, P >::value, bool >::type = true>
constexpr bool mir::geometry::generic::operator== ( P const &  lhs,
P const &  rhs 
)
inlineconstexpr

◆ operator==() [3/4]

template<typename P , typename S >
constexpr bool mir::geometry::generic::operator== ( Rectangle< P, S > const &  lhs,
Rectangle< P, S > const &  rhs 
)
inlineconstexpr

◆ operator==() [4/4]

template<typename S , typename std::enable_if< std::is_base_of< detail::SizeBase, S >::value, bool >::type = true>
constexpr bool mir::geometry::generic::operator== ( S const &  lhs,
S const &  rhs 
)
inlineconstexpr

Copyright © 2012-2022 Canonical Ltd.
Generated on śro, 1 cze 2022, 16:52:55 UTC
This documentation is licensed under the GPL version 2 or 3.