Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CSizeGen< T > Class Template Reference

#include <Geometry.h>

Public Types

typedef CSizeGen< T > this_type
 

Public Member Functions

 CSizeGen () noexcept=default
 
 CSizeGen (T width, T height)
 
Width () const
 
Height () const
 
void SetWidth (T width)
 
void SetHeight (T height)
 
void Set (T width, T height)
 
bool IsZero () const
 
Area () const
 
CPointGen< T > ToPoint () const
 
template<class U >
 CSizeGen (const CSizeGen< U > &rhs)
 
this_type operator+ (const this_type &size) const
 
this_typeoperator+= (const this_type &size)
 
this_type operator- (const this_type &size) const
 
this_typeoperator-= (const this_type &size)
 
this_type operator* (T factor) const
 
this_typeoperator*= (T factor)
 
this_type operator/ (T factor) const
 
this_typeoperator/= (T factor)
 

Detailed Description

template<typename T>
class CSizeGen< T >

Generic two-dimensional size representation

Class invariant: width and height are both non-negative Throws std::out_of_range if invariant would be violated. The class is exception-safe. If modification would violate the invariant, the size is not changed.

Member Typedef Documentation

◆ this_type

template<typename T >
typedef CSizeGen<T> CSizeGen< T >::this_type

Constructor & Destructor Documentation

◆ CSizeGen() [1/3]

template<typename T >
CSizeGen< T >::CSizeGen ( )
defaultnoexcept

◆ CSizeGen() [2/3]

template<typename T >
CSizeGen< T >::CSizeGen ( T width,
T height )
inline

◆ CSizeGen() [3/3]

template<typename T >
template<class U >
CSizeGen< T >::CSizeGen ( const CSizeGen< U > & rhs)
inlineexplicit

Member Function Documentation

◆ Area()

template<typename T >
T CSizeGen< T >::Area ( ) const
inline

◆ Height()

template<typename T >
T CSizeGen< T >::Height ( ) const
inline

◆ IsZero()

template<typename T >
bool CSizeGen< T >::IsZero ( ) const
inline

◆ operator*()

template<typename T >
this_type CSizeGen< T >::operator* ( T factor) const
inline

◆ operator*=()

template<typename T >
this_type & CSizeGen< T >::operator*= ( T factor)
inline

◆ operator+()

template<typename T >
this_type CSizeGen< T >::operator+ ( const this_type & size) const
inline

◆ operator+=()

template<typename T >
this_type & CSizeGen< T >::operator+= ( const this_type & size)
inline

◆ operator-()

template<typename T >
this_type CSizeGen< T >::operator- ( const this_type & size) const
inline

◆ operator-=()

template<typename T >
this_type & CSizeGen< T >::operator-= ( const this_type & size)
inline

◆ operator/()

template<typename T >
this_type CSizeGen< T >::operator/ ( T factor) const
inline

◆ operator/=()

template<typename T >
this_type & CSizeGen< T >::operator/= ( T factor)
inline

◆ Set()

template<typename T >
void CSizeGen< T >::Set ( T width,
T height )
inline

◆ SetHeight()

template<typename T >
void CSizeGen< T >::SetHeight ( T height)
inline

◆ SetWidth()

template<typename T >
void CSizeGen< T >::SetWidth ( T width)
inline

◆ ToPoint()

template<typename T >
CPointGen< T > CSizeGen< T >::ToPoint ( ) const
inline

◆ Width()

template<typename T >
T CSizeGen< T >::Width ( ) const
inline

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