Tag Parser  6.4.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Public Member Functions | List of all members
Media::Size Class Reference

The Size class defines the size of a two-dimensional object using integer point precision. More...

#include <size.h>

Public Member Functions

constexpr Size ()
 Constructs a new Size. More...
 
constexpr Size (uint32 width, uint32 height)
 Constructs a new Size of the specified width and height. More...
 
constexpr uint32 width () const
 Returns the width. More...
 
constexpr uint32 height () const
 Returns the height. More...
 
void setWidth (uint32 value)
 Sets the width. More...
 
void setHeight (uint32 value)
 Sets the height. More...
 
constexpr uint32 resolution () const
 Returns the resolution of the current instance (product of with and height). More...
 
const char * abbreviation () const
 Returns an abbreviation for the current instance, eg. More...
 
bool constexpr isNull () const
 Returns an indication whether both the width and height is 0. More...
 
bool constexpr operator== (const Size &other) const
 Returns whether this instance equals other. More...
 
bool constexpr operator>= (const Size &other) const
 Returns whether this instance is greather than other. More...
 
std::string toString () const
 Returns the string representation of the current size. More...
 

Detailed Description

The Size class defines the size of a two-dimensional object using integer point precision.

Definition at line 16 of file size.h.

Constructor & Destructor Documentation

◆ Size() [1/2]

constexpr Media::Size::Size ( )

Constructs a new Size.

Definition at line 42 of file size.h.

◆ Size() [2/2]

constexpr Media::Size::Size ( uint32  width,
uint32  height 
)

Constructs a new Size of the specified width and height.

Definition at line 50 of file size.h.

Member Function Documentation

◆ abbreviation()

const char * Media::Size::abbreviation ( ) const

Returns an abbreviation for the current instance, eg.

720p for sizes greather than 1280×720 and 1080p for sizes greather than 1920×1080.

Definition at line 9 of file size.cpp.

◆ height()

constexpr uint32 Media::Size::height ( ) const

Returns the height.

Definition at line 66 of file size.h.

◆ isNull()

constexpr bool Media::Size::isNull ( ) const

Returns an indication whether both the width and height is 0.

Definition at line 98 of file size.h.

◆ operator==()

constexpr bool Media::Size::operator== ( const Size other) const

Returns whether this instance equals other.

Definition at line 106 of file size.h.

◆ operator>=()

constexpr bool Media::Size::operator>= ( const Size other) const

Returns whether this instance is greather than other.

Remarks
Both dimensions must be greather. This operator does not take the resolution() into account.

Definition at line 115 of file size.h.

◆ resolution()

constexpr uint32 Media::Size::resolution ( ) const

Returns the resolution of the current instance (product of with and height).

Definition at line 90 of file size.h.

◆ setHeight()

void Media::Size::setHeight ( uint32  value)
inline

Sets the height.

Definition at line 82 of file size.h.

◆ setWidth()

void Media::Size::setWidth ( uint32  value)
inline

Sets the width.

Definition at line 74 of file size.h.

◆ toString()

std::string Media::Size::toString ( ) const
inline

Returns the string representation of the current size.

Definition at line 123 of file size.h.

◆ width()

constexpr uint32 Media::Size::width ( ) const

Returns the width.

Definition at line 58 of file size.h.


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