CBMC
|
#include <memory_units.h>
Public Member Functions | |
memory_sizet () | |
memory_sizet (const memory_sizet &) | |
memory_sizet (memory_sizet &&) | |
memory_sizet & | operator= (const memory_sizet &) |
memory_sizet & | operator= (memory_sizet &&) noexcept |
memory_sizet & | operator+= (const memory_sizet &) |
memory_sizet | operator+ (const memory_sizet &) const |
std::size_t | get_bytes () const |
std::size_t | get_kibibytes () const |
std::size_t | get_mebibytes () const |
std::size_t | get_gibibytes () const |
std::string | to_string () const |
Static Public Member Functions | |
static memory_sizet | from_bytes (std::size_t bytes) |
Static Public Attributes | |
static const char * | si_byte_symbol = "B" |
static const char * | si_kibibyte_symbol = "KiB" |
static const char * | si_mebibyte_symbol = "MiB" |
static const char * | si_gibibyte_symbol = "GiB" |
Private Member Functions | |
memory_sizet (std::size_t bytes) | |
Private Attributes | |
std::size_t | bytes |
Definition at line 15 of file memory_units.h.
memory_sizet::memory_sizet | ( | ) |
Definition at line 13 of file memory_units.cpp.
memory_sizet::memory_sizet | ( | const memory_sizet & | other | ) |
Definition at line 19 of file memory_units.cpp.
memory_sizet::memory_sizet | ( | memory_sizet && | other | ) |
Definition at line 22 of file memory_units.cpp.
|
explicitprivate |
Definition at line 16 of file memory_units.cpp.
|
static |
Definition at line 38 of file memory_units.cpp.
std::size_t memory_sizet::get_bytes | ( | ) | const |
Definition at line 43 of file memory_units.cpp.
std::size_t memory_sizet::get_gibibytes | ( | ) | const |
Definition at line 58 of file memory_units.cpp.
std::size_t memory_sizet::get_kibibytes | ( | ) | const |
Definition at line 48 of file memory_units.cpp.
std::size_t memory_sizet::get_mebibytes | ( | ) | const |
Definition at line 53 of file memory_units.cpp.
memory_sizet memory_sizet::operator+ | ( | const memory_sizet & | other | ) | const |
Definition at line 112 of file memory_units.cpp.
memory_sizet & memory_sizet::operator+= | ( | const memory_sizet & | other | ) |
Definition at line 106 of file memory_units.cpp.
memory_sizet & memory_sizet::operator= | ( | const memory_sizet & | other | ) |
Definition at line 26 of file memory_units.cpp.
|
noexcept |
Definition at line 32 of file memory_units.cpp.
std::string memory_sizet::to_string | ( | ) | const |
Definition at line 63 of file memory_units.cpp.
|
private |
Definition at line 42 of file memory_units.h.
|
static |
Definition at line 36 of file memory_units.h.
|
static |
Definition at line 39 of file memory_units.h.
|
static |
Definition at line 37 of file memory_units.h.
|
static |
Definition at line 38 of file memory_units.h.