72 operator size_t() const noexcept {
86 operator bool() const noexcept {
122 return m_bytes == other.m_bytes;
130 return !(*
this == other);
137 std::swap(
m_bytes, other.m_bytes);
bool operator!=(const Sizer &other) const noexcept
Check if two sizers are not equal.
Definition: Sizer.h:129
void swap(Sizer &other) noexcept
Definition: Sizer.h:136
void append(size_t bytes) noexcept
Append bytes to current byte count.
Definition: Sizer.h:27
size_t getMBytes() const noexcept
Get current size.
Definition: Sizer.h:60
Sizer(const Sizer &other) noexcept
Initializes sizer with another sizer value.
Definition: Sizer.h:20
size_t getBytes() const noexcept
Get current size.
Definition: Sizer.h:46
size_t m_bytes
Current measured size in bytes.
Definition: Sizer.h:141
Sizer() noexcept
Initializes sizer with zero.
Definition: Sizer.h:13
size_t getGBytes() const noexcept
Get current size.
Definition: Sizer.h:67
Sizer & operator=(const Sizer &other) noexcept
Assign value of another sizer.
Definition: Sizer.h:112
Sizer & operator<<(const Sizer &other) noexcept
Append other sizer byte count to current byte count.
Definition: Sizer.h:103
void append(const Sizer &other) noexcept
Append other sizer byte count to current byte count.
Definition: Sizer.h:34
size_t getKBytes() const noexcept
Get current size.
Definition: Sizer.h:53
bool isEmpty() const noexcept
Check whether size is zero.
Definition: Sizer.h:79
Sizer & operator<<(size_t bytes) noexcept
Append bytes to current byte count.
Definition: Sizer.h:94
void reset() noexcept
Reset byte count to zero.
Definition: Sizer.h:39
Helper entity to measure size of dynamic objects in memory.
Definition: Sizer.h:9
bool operator==(const Sizer &other) const noexcept
Check if two sizers are equal.
Definition: Sizer.h:121