Tag Parser  8.0.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Public Member Functions | List of all members
TagParser::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 TagParser::Size::Size ( )

Constructs a new Size.

Definition at line 41 of file size.h.

◆ Size() [2/2]

constexpr TagParser::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 * TagParser::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 TagParser::Size::height ( ) const

Returns the height.

Definition at line 67 of file size.h.

◆ isNull()

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

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

Definition at line 99 of file size.h.

◆ operator==()

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

Returns whether this instance equals other.

Definition at line 107 of file size.h.

◆ operator>=()

constexpr bool TagParser::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 116 of file size.h.

◆ resolution()

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

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

Definition at line 91 of file size.h.

◆ setHeight()

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

Sets the height.

Definition at line 83 of file size.h.

◆ setWidth()

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

Sets the width.

Definition at line 75 of file size.h.

◆ toString()

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

Returns the string representation of the current size.

Definition at line 124 of file size.h.

◆ width()

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

Returns the width.

Definition at line 59 of file size.h.


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