chronon::params::Size
Memory size with automatic unit parsing (B/KiB/MiB/GiB/KB/MB/GB). More...
#include <UnitTypes.hpp>
Public Functions
| Name | |
|---|---|
| std::string | toString() const |
| bool | operator>(const Size & other) const |
| bool | operator==(const Size & other) const |
| bool | operator<(const Size & other) const |
| Size | operator/(uint64_t scalar) const |
| uint64_t | operator/(const Size & other) const |
| Size | operator-(const Size & other) const |
| Size | operator+(const Size & other) const |
| Size | operator*(uint64_t scalar) const |
| bool | operator!=(const Size & other) const |
| double | mib() const |
| double | mb() const |
| double | kib() const |
| double | kb() const |
| double | gib() const |
| double | gb() const |
| uint64_t | bytes() const |
| Size(const std::string & s) | |
| Size(uint64_t bytes) | |
| Size() |
Detailed Description
class chronon::params::Size;
Memory size with automatic unit parsing (B/KiB/MiB/GiB/KB/MB/GB).
Both binary (1024-based) and decimal (1000-based) suffixes are accepted.
Size cache("64KiB");
uint64_t bytes = cache.bytes(); // 65536
Public Functions Documentation
function toString
inline std::string toString() const
function operator>
inline bool operator>(
const Size & other
) const
function operator==
inline bool operator==(
const Size & other
) const
function operator<
inline bool operator<(
const Size & other
) const
function operator/
inline Size operator/(
uint64_t scalar
) const
function operator/
inline uint64_t operator/(
const Size & other
) const
function operator-
inline Size operator-(
const Size & other
) const
function operator+
inline Size operator+(
const Size & other
) const
function operator*
inline Size operator*(
uint64_t scalar
) const
function operator!=
inline bool operator!=(
const Size & other
) const
function mib
inline double mib() const
function mb
inline double mb() const
function kib
inline double kib() const
function kb
inline double kb() const
function gib
inline double gib() const
function gb
inline double gb() const
function bytes
inline uint64_t bytes() const
function Size
inline explicit Size(
const std::string & s
)
function Size
inline explicit Size(
uint64_t bytes
)
function Size
inline Size()
Updated on 2026-05-26 at 05:42:32 +0000