zz::Size_< _Tp > Class Template Reference

The 2D size class The class represents the size of a 2D rectangle, image size, matrix size etc. Normally, Size ~ Size_<int> is used. More...

#include <zupply.hpp>

Public Types

typedef _Tp value_type
 

Public Member Functions

 Size_ ()
 Default ctor.
 
 Size_ (_Tp width, _Tp height)
 Ctor with width and height. More...
 
 Size_ (const Size_ &sz)
 Copy ctor. More...
 
Size_operator= (const Size_ &sz)
 Copy operator. More...
 
bool operator== (const Size_ &other)
 Compare operator. More...
 
bool operator!= (const Size_ &other)
 Compare operator. More...
 
_Tp area () const
 area Calculate area More...
 
template<typename _Tp2 >
 operator Size_< _Tp2 > () const
 Covnert to another type.
 

Public Attributes

_Tp width
 
_Tp height
 

Detailed Description

template<typename _Tp>
class zz::Size_< _Tp >

The 2D size class The class represents the size of a 2D rectangle, image size, matrix size etc. Normally, Size ~ Size_<int> is used.

Constructor & Destructor Documentation

template<typename _Tp>
zz::Size_< _Tp >::Size_ ( _Tp  width,
_Tp  height 
)

Ctor with width and height.

Parameters
width
height
template<typename _Tp>
zz::Size_< _Tp >::Size_ ( const Size_< _Tp > &  sz)

Copy ctor.

Parameters
sz

Member Function Documentation

template<typename _Tp>
_Tp zz::Size_< _Tp >::area ( ) const

area Calculate area

Returns
Area
template<typename _Tp>
bool zz::Size_< _Tp >::operator!= ( const Size_< _Tp > &  other)

Compare operator.

Parameters
other
Returns
True if size NOT identical
template<typename _Tp>
Size_& zz::Size_< _Tp >::operator= ( const Size_< _Tp > &  sz)

Copy operator.

Parameters
sz
template<typename _Tp>
bool zz::Size_< _Tp >::operator== ( const Size_< _Tp > &  other)

Compare operator.

Parameters
other
Returns
True if size identical

The documentation for this class was generated from the following file: