#include <wipal/tool/si.hh>
Public Member Functions | |
SI_unit (uint64_t) | |
template<size_t OneRHSUnitInBits> | |
SI_unit (const SI_unit< OneRHSUnitInBits > &) | |
uint64_t | bits () const |
uint64_t | bytes () const |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
template<> | |
const char * | abbrev_ |
Static Public Member Functions | |
static std::string | abbrev () |
E.g.
typedef SI_unit<8> byte; typedef SI_unit<8192> kilobyte; const int i = 65536; std::cout << i << " bits is " << byte (i) << " and " << kilobyte (i) << std::endl;
tool::internals::SI_unit< OneUnitInBits >::SI_unit | ( | uint64_t | count | ) | [inline] |
Construct a SI_unit from a number of units.
tool::internals::SI_unit< OneUnitInBits >::SI_unit | ( | const SI_unit< OneRHSUnitInBits > & | rhs | ) | [inline] |
Automatic conversion from one SI_unit to another.
std::string tool::internals::SI_unit< OneUnitInBits >::abbrev | ( | ) | [inline, static] |
Get this unit's abbreviation.
uint64_t tool::internals::SI_unit< OneUnitInBits >::bits | ( | ) | const [inline] |
Retrieve the stored number of bits.
uint64_t tool::internals::SI_unit< OneUnitInBits >::bytes | ( | ) | const [inline] |
Retrieve the stored number of bytes.