Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::SizeType< T > Struct Template Reference

Size representation based on pixels. More...

Public Member Functions

 SizeType (T aWidth=0, T aHeight=0)
 Constructor initializing width and height to 0 if no values are passed in.
bool isEmpty () const
 Returns true if both dimensions are set to 0.
bool operator== (const SizeType &item) const
 Comparison operator equal.
bool operator!= (const SizeType &item) const
 Comparison operator not equal.

Public Attributes

width
 Width of a rectangle, in pixels, such as a viewport, or the screen.
height
 Height of a rectangle, in pixels, such as a viewport, or the screen.

Detailed Description

template<typename T>
struct gem::SizeType< T >

Size representation based on pixels.

Constructor & Destructor Documentation

◆ SizeType()

template<typename T>
gem::SizeType< T >::SizeType ( T aWidth = 0,
T aHeight = 0 )
inlineexplicit

Constructor initializing width and height to 0 if no values are passed in.

Parameters
aWidthWidth of a rectangle, in pixels, such as a viewport, or the screen.
aHeightHeight of a rectangle, in pixels, such as a viewport, or the screen.
Template Parameters
TType of the width and height values.

Member Function Documentation

◆ isEmpty()

template<typename T>
bool gem::SizeType< T >::isEmpty ( ) const
inline

Returns true if both dimensions are set to 0.

Returns
True if both dimensions are set to 0, false otherwise.

◆ operator!=()

template<typename T>
bool gem::SizeType< T >::operator!= ( const SizeType< T > & item) const
inline

Comparison operator not equal.

Parameters
itemSizeType to compare to.
Returns
True if dimensions differ, false otherwise.

◆ operator==()

template<typename T>
bool gem::SizeType< T >::operator== ( const SizeType< T > & item) const
inline

Comparison operator equal.

Parameters
itemSizeType to compare to.
Returns
True if both dimensions are equal, false otherwise.