#include <memory.hpp>
Definition at line 5 of file memory.hpp.
◆ Unit
Enumerator |
---|
eBytes | |
eKilobytes | |
eMegabytes | |
eGigabytes | |
eTerabytes | |
eLimit | |
Definition at line 6 of file memory.hpp.
◆ Memory()
constexpr Memory::Memory |
( |
size_t |
memory = 0 , |
|
|
Unit |
unit = eBytes |
|
) |
| |
|
inlineconstexpr |
◆ as_bytes()
constexpr size_t Memory::as_bytes |
( |
| ) |
const |
|
inlineconstexpr |
◆ as_gigabytes()
constexpr size_t Memory::as_gigabytes |
( |
| ) |
const |
|
inlineconstexpr |
◆ as_kilobytes()
constexpr size_t Memory::as_kilobytes |
( |
| ) |
const |
|
inlineconstexpr |
◆ as_megabytes()
constexpr size_t Memory::as_megabytes |
( |
| ) |
const |
|
inlineconstexpr |
◆ as_terabytes()
constexpr size_t Memory::as_terabytes |
( |
| ) |
const |
|
inlineconstexpr |
◆ b()
constexpr size_t Memory::b |
( |
| ) |
const |
|
inlineconstexpr |
◆ bytes()
constexpr static Memory Memory::bytes |
( |
size_t |
bytes | ) |
|
|
inlinestaticconstexpr |
◆ gb()
constexpr size_t Memory::gb |
( |
| ) |
const |
|
inlineconstexpr |
◆ gigabytes()
constexpr static Memory Memory::gigabytes |
( |
size_t |
gigabytes | ) |
|
|
inlinestaticconstexpr |
◆ kb()
constexpr size_t Memory::kb |
( |
| ) |
const |
|
inlineconstexpr |
◆ kilobytes()
constexpr static Memory Memory::kilobytes |
( |
size_t |
kilobytes | ) |
|
|
inlinestaticconstexpr |
◆ mb()
constexpr size_t Memory::mb |
( |
| ) |
const |
|
inlineconstexpr |
◆ megabytes()
constexpr static Memory Memory::megabytes |
( |
size_t |
megabytes | ) |
|
|
inlinestaticconstexpr |
◆ operator+()
constexpr Memory Memory::operator+ |
( |
const Memory & |
rhs | ) |
const |
|
inlineconstexpr |
◆ operator+=()
◆ operator-()
constexpr Memory Memory::operator- |
( |
const Memory & |
rhs | ) |
const |
|
inlineconstexpr |
◆ operator-=()
◆ tb()
constexpr size_t Memory::tb |
( |
| ) |
const |
|
inlineconstexpr |
◆ terabytes()
constexpr static Memory Memory::terabytes |
( |
size_t |
terabytes | ) |
|
|
inlinestaticconstexpr |
◆ to_string()
std::string Memory::to_string |
( |
| ) |
const |
◆ operator<=>
constexpr friend auto operator<=> |
( |
const Memory & |
lhs, |
|
|
const Memory & |
rhs |
|
) |
| |
|
friend |
◆ kByte
constexpr size_t Memory::kByte = 1 |
|
staticconstexpr |
◆ kGigabyte
constexpr size_t Memory::kGigabyte = kMegabyte * 1024 |
|
staticconstexpr |
◆ kKilobyte
constexpr size_t Memory::kKilobyte = kByte * 1024 |
|
staticconstexpr |
◆ kMegabyte
constexpr size_t Memory::kMegabyte = kKilobyte * 1024 |
|
staticconstexpr |
◆ kNames
constexpr const char* Memory::kNames[eLimit] |
|
staticconstexpr |
Initial value:= {
"b", "kb", "mb", "gb", "tb"
}
Definition at line 29 of file memory.hpp.
◆ kSizes
constexpr size_t Memory::kSizes[eLimit] |
|
staticconstexpr |
Initial value:= {
}
static constexpr size_t kGigabyte
static constexpr size_t kKilobyte
static constexpr size_t kMegabyte
static constexpr size_t kByte
static constexpr size_t kTerabyte
Definition at line 21 of file memory.hpp.
◆ kTerabyte
constexpr size_t Memory::kTerabyte = kGigabyte * 1024 |
|
staticconstexpr |
The documentation for this struct was generated from the following files: