CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
26 namespace catapult {
namespace utils {
63 return bytes() / 1024;
67 constexpr uint64_t
bytes()
const {
73 return checked_cast<uint64_t, uint32_t>(
m_bytes);
84 return !(*
this == rhs);
constexpr uint64_t bytes() const
Returns the number of bytes.
Definition: FileSize.h:67
uint64_t m_bytes
Definition: FileSize.h:108
constexpr uint64_t kilobytes() const
Returns the number of kilobytes.
Definition: FileSize.h:62
constexpr FileSize()
Creates a default (zero) file size.
Definition: FileSize.h:36
uint32_t bytes32() const
Returns the number of bytes as a uint32_t.
Definition: FileSize.h:72
static constexpr FileSize FromMegabytes(uint64_t megabytes)
Creates a file size from the given number of megabytes.
Definition: FileSize.h:41
constexpr uint64_t megabytes() const
Returns the number of megabytes.
Definition: FileSize.h:57
Represents a file size.
Definition: FileSize.h:29
constexpr bool operator!=(const FileSize &rhs) const
Returns true if this file size is not equal to rhs.
Definition: FileSize.h:83
constexpr bool operator<=(const FileSize &rhs) const
Returns true if this file size is less than or equal to rhs.
Definition: FileSize.h:98
constexpr bool operator>=(const FileSize &rhs) const
Returns true if this file size is greater than or equal to rhs.
Definition: FileSize.h:88
std::ostream & operator<<(std::ostream &out, const BlockSpan &blockSpan)
Insertion operator for outputting blockSpan to out.
Definition: BlockSpan.cpp:27
static constexpr FileSize FromKilobytes(uint64_t kilobytes)
Creates a file size from the given number of kilobytes.
Definition: FileSize.h:46
Definition: AddressExtractionExtension.cpp:28
static constexpr FileSize FromBytes(uint64_t bytes)
Creates a file size from the given number of bytes.
Definition: FileSize.h:51
constexpr FileSize(uint64_t bytes)
Definition: FileSize.h:31
bool m_hasOutput
Definition: FileSize.cpp:60
std::ostream & m_out
Definition: FileSize.cpp:59
constexpr bool operator>(const FileSize &rhs) const
Returns true if this file size is greater than rhs.
Definition: FileSize.h:93
constexpr bool operator==(const FileSize &rhs) const
Returns true if this file size is equal to rhs.
Definition: FileSize.h:78
constexpr bool operator<(const FileSize &rhs) const
Returns true if this file size is less than rhs.
Definition: FileSize.h:103