nomlib
Loading...
Searching...
No Matches
nom::Size2< T > Struct Template Reference

Size coordinates (width & height) container. More...

#include <Size2.hpp>

Public Member Functions

 Size2 (void)
 Default constructor; initialize values to Size2<T>::null.
 ~Size2 (void)
 Destructor.
 Size2 (T w, T h)
 Constructor variant for initializing width & height at construction.
template<typename U>
 Size2 (const Size2< U > &copy)
 Copy constructor.
template<typename U>
Size2 max (const Size2< U > &rhs)
 Compare two Size2 objects and return the larger width and height of the two objects.
template<typename U>
Size2 min (const Size2< U > &rhs)
 Compare two Size2 objects and return the smaller width and height of the two objects.
void swap (void)
 Transpose width and height dimensions.

Public Attributes

w
 Represents the width coordinate point.
h
 Represents the height coordinate point.

Static Public Attributes

static const Size2 null
 Null value.
static const Size2 zero
 Zero value constant.

Detailed Description

template<typename T>
struct nom::Size2< T >

Size coordinates (width & height) container.

Definition at line 56 of file Size2.hpp.

Constructor & Destructor Documentation

◆ Size2() [1/3]

template<typename T>
nom::Size2< T >::Size2 ( void )
inline

Default constructor; initialize values to Size2<T>::null.

Definition at line 59 of file Size2.hpp.

◆ ~Size2()

template<typename T>
nom::Size2< T >::~Size2 ( void )
inline

Destructor.

Definition at line 67 of file Size2.hpp.

◆ Size2() [2/3]

template<typename T>
nom::Size2< T >::Size2 ( T w,
T h )
inline

Constructor variant for initializing width & height at construction.

Definition at line 73 of file Size2.hpp.

◆ Size2() [3/3]

template<typename T>
template<typename U>
nom::Size2< T >::Size2 ( const Size2< U > & copy)
inlineexplicit

Copy constructor.

Remarks
The explicit keyword here will result in compile-time errors in any instance that it finds incompatible casting occurring, such as if you try to down-cast a Size2<int> to a Size2<float>.

Definition at line 86 of file Size2.hpp.

Member Function Documentation

◆ max()

template<typename T>
template<typename U>
Size2 nom::Size2< T >::max ( const Size2< U > & rhs)
inline

Compare two Size2 objects and return the larger width and height of the two objects.

Definition at line 97 of file Size2.hpp.

◆ min()

template<typename T>
template<typename U>
Size2 nom::Size2< T >::min ( const Size2< U > & rhs)
inline

Compare two Size2 objects and return the smaller width and height of the two objects.

Definition at line 105 of file Size2.hpp.

◆ swap()

template<typename T>
void nom::Size2< T >::swap ( void )
inline

Transpose width and height dimensions.

Definition at line 111 of file Size2.hpp.

Member Data Documentation

◆ h

template<typename T>
T nom::Size2< T >::h

Represents the height coordinate point.

Definition at line 128 of file Size2.hpp.

◆ null

template<typename T>
const Size2 nom::Size2< T >::null
static

Null value.

Remarks
Null value implementation depends on signed (negative) numbers.

Definition at line 119 of file Size2.hpp.

◆ w

template<typename T>
T nom::Size2< T >::w

Represents the width coordinate point.

Definition at line 125 of file Size2.hpp.

◆ zero

template<typename T>
const Size2 nom::Size2< T >::zero
static

Zero value constant.

Definition at line 122 of file Size2.hpp.


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