1#ifndef TAG_PARSER_SIZE_H
2#define TAG_PARSER_SIZE_H
6#include <c++utilities/conversion/stringbuilder.h>
20 constexpr Size(std::uint32_t width, std::uint32_t height);
22 constexpr std::uint32_t width()
const;
23 constexpr std::uint32_t height()
const;
24 void setWidth(std::uint32_t value);
25 void setHeight(std::uint32_t value);
26 constexpr std::uint32_t resolution()
const;
27 std::string_view abbreviation()
const;
29 bool constexpr isNull()
const;
32 std::string toString()
const;
35 std::uint32_t m_width;
36 std::uint32_t m_height;
51constexpr Size::Size(std::uint32_t width, std::uint32_t height)
94 return m_width * m_height;
102 return (m_width == 0) && (m_height == 0);
110 return (m_width == other.m_width) && (m_height == other.m_height);
119 return (m_width >= other.m_width) && (m_height >= other.m_height);
127 return CppUtilities::argsToString(
"width: ", m_width,
", height: ", m_height);
The Size class defines the size of a two-dimensional object using integer point precision.
constexpr std::uint32_t height() const
Returns the height.
void setWidth(std::uint32_t value)
Sets the width.
constexpr std::uint32_t width() const
Returns the width.
bool constexpr isNull() const
Returns an indication whether both the width and height is 0.
std::string toString() const
Returns the string representation of the current size.
constexpr std::uint32_t resolution() const
Returns the resolution of the current instance (product of with and height).
bool constexpr operator>=(const Size &other) const
Returns whether this instance is greater than other.
void setHeight(std::uint32_t value)
Sets the height.
constexpr Size()
Constructs a new Size.
bool constexpr operator==(const Size &other) const
Returns whether this instance equals other.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Contains all classes and functions of the TagInfo library.
constexpr bool operator>=(MatroskaElementLevel lhs, MatroskaElementLevel rhs)
constexpr bool operator==(std::uint8_t lhs, FlacMetaDataBlockType type)