wpl::tool::internals::SI_unit< OneUnitInBits > Struct Template Reference

Helper class to display human readable bit sizes. More...

#include <wipal/tool/si.hh>

List of all members.

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 ()

Detailed Description

template<size_t OneUnitInBits>
struct wpl::tool::internals::SI_unit< OneUnitInBits >

Helper class to display human readable bit sizes.

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;

The documentation for this struct was generated from the following files:

Generated by  doxygen 1.6.2