blip  0.1
Size Class Reference

A rectangular size that has a width and a height. More...

#include <Size.hpp>

Public Member Functions

 Size () throw ()
 Construct a new Size with 0 width and height. More...
 
 Size (uint_t width, uint_t height) throw ()
 Construct a new Size with the given width and height. More...
 
 ~Size () throw ()
 Destructor. More...
 
uint_t getWidth () const throw ()
 Get the width. More...
 
void setWidth (uint_t width) throw ()
 Set the width. More...
 
uint_t getHeight () const throw ()
 Get the height. More...
 
void setHeight (uint_t height) throw ()
 Set the height. More...
 
void setSize (uint_t width, uint_t height) throw ()
 Set the width and height. More...
 
bool isEmpty () const throw ()
 Test if this dimension is empty, i.e., has 0 width and/or height. More...
 
bool operator== (const Size &other) const throw ()
 Equality operator. More...
 
bool operator!= (const Size &other) const throw ()
 Inequality operator. More...
 
 operator const void * () const throw ()
 Boolean operator. More...
 
bool operator! () const throw ()
 Not operator. More...
 
bool fitsInside (const Size &other) const throw ()
 Test if this Size "fits inside" another one, e.g., whether the other Size's width and height are both greater than or equal to those of this Size. More...
 

Detailed Description

A rectangular size that has a width and a height.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ Size() [1/2]

Size ( )
throw (
)

Construct a new Size with 0 width and height.

◆ Size() [2/2]

Size ( uint_t  width,
uint_t  height 
)
throw (
)

Construct a new Size with the given width and height.

◆ ~Size()

~Size ( )
throw (
)

Destructor.

Member Function Documentation

◆ fitsInside()

bool fitsInside ( const Size other) const
throw (
)

Test if this Size "fits inside" another one, e.g., whether the other Size's width and height are both greater than or equal to those of this Size.

Parameters
otherThe other Size.
Returns
true If this Size fits inside the other one, false otherwise.

◆ getHeight()

uint_t getHeight ( ) const
throw (
)
inline

Get the height.

◆ getWidth()

uint_t getWidth ( ) const
throw (
)
inline

Get the width.

◆ isEmpty()

bool isEmpty ( ) const
throw (
)

Test if this dimension is empty, i.e., has 0 width and/or height.

◆ operator const void *()

operator const void * ( ) const
throw (
)
inline

Boolean operator.

Equivalent to ! isEmpty().

◆ operator!()

bool operator! ( ) const
throw (
)
inline

Not operator.

Equivalent to isEmpty().

◆ operator!=()

bool operator!= ( const Size other) const
throw (
)
inline

Inequality operator.

◆ operator==()

bool operator== ( const Size other) const
throw (
)

Equality operator.

◆ setHeight()

void setHeight ( uint_t  height)
throw (
)
inline

Set the height.

◆ setSize()

void setSize ( uint_t  width,
uint_t  height 
)
throw (
)

Set the width and height.

◆ setWidth()

void setWidth ( uint_t  width)
throw (
)
inline

Set the width.


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