Classes | |
struct | BitObjHolder |
An object wrapping some data (copy), with a tag type. More... | |
struct | BinObjTag |
Tag object for BinObj . More... | |
struct | BinObj |
Holder for data to be presented in binary format (base 2). More... | |
struct | HexObjTag |
struct | HexObj |
Holder for data to be presented in hexadecimal format (base 16). More... | |
struct | HexDumper |
Wrapper to have data printed as hexadecimal dump. More... | |
struct | ZeroPadder |
A wrapper padding the dump of its data with zeroes (or C ). More... | |
struct | Blanks |
An object representing N characters of value C . More... | |
Functions | |
template<typename T > | |
constexpr T | fourMSBmask () |
Returns a bit mask of type T with the four most significant bits set. More... | |
template<typename T > | |
void | printHex (std::ostream &out, T value) |
Prints a zero-padded integral value into out . More... | |
template<unsigned int N, char C = ' '> | |
std::ostream & | operator<< (std::ostream &out, Blanks< N, C >) |
Dumps N characters of value C to out stream. More... | |
template<typename T , unsigned int Bits> | |
std::ostream & | operator<< (std::ostream &out, BinObj< T, Bits > const &data) |
Dumps data bit by bit into out stream. More... | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &out, HexObj< T > const &data) |
Dumps data nibble by nibble into out stream. More... | |
template<typename Atom > | |
std::ostream & | operator<< (std::ostream &out, HexDumper< Atom > const &data) |
Dumps data in a hexadecimal table. More... | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &out, ZeroPadder< T > const &data) |
Dumps a value padding with 0 via ZeroPadder wrapper. More... | |
constexpr T icarus::ns::util::details::fourMSBmask | ( | ) |
Returns a bit mask of type T
with the four most significant bits set.
std::ostream & icarus::ns::util::details::operator<< | ( | std::ostream & | out, |
Blanks< N, C > | |||
) |
Dumps N
characters of value C
to out
stream.
Definition at line 390 of file BinaryDumpUtils.h.
std::ostream & icarus::ns::util::details::operator<< | ( | std::ostream & | out, |
BinObj< T, Bits > const & | data | ||
) |
Dumps data
bit by bit into out
stream.
out | output stream |
data | data wrapper with information on how many bits to dump |
out
Parameters of the dump are read from the data
wrapper. The dump is in format (Bits) bbb bbbb bbbb ...
(Bits
is the number of bits, and b
are bit values, 0
or 1
, the first being the most significant bit).
Definition at line 400 of file BinaryDumpUtils.h.
std::ostream & icarus::ns::util::details::operator<< | ( | std::ostream & | out, |
HexObj< T > const & | data | ||
) |
Dumps data
nibble by nibble into out
stream.
out | output stream |
data | data wrapper |
out
The value in data
is printed in hexadecimal format, including all its bits. The STL std::hex
mode of a stream may be more convenient, but it's sticky:
Parameters of the dump are read from the data
wrapper. The dump is in format (Bits) bbb bbbb bbbb ...
(Bits
is the number of bits, and b
are bit values, 0
or 1
, the first being the most significant bit).
Definition at line 421 of file BinaryDumpUtils.h.
std::ostream & icarus::ns::util::details::operator<< | ( | std::ostream & | out, |
HexDumper< Atom > const & | data | ||
) |
Dumps data in a hexadecimal table.
out | output stream |
data | data wrapper with information on how to dump it |
out
Wrapped data is printed in a table: address of the first Atom
of data, a separator |
, a sequence of as many atom values as specified in data.columns
, in hexadecimal format and zero-padded, and another separator |
. If there are 6 or more columns, a larger space indentation is inserted between the two central columns. The table is written on a new line, and the line is ended after the table.
Definition at line 428 of file BinaryDumpUtils.h.
std::ostream & icarus::ns::util::details::operator<< | ( | std::ostream & | out, |
ZeroPadder< T > const & | data | ||
) |
Dumps a value padding with 0
via ZeroPadder
wrapper.
Definition at line 483 of file BinaryDumpUtils.h.
void icarus::ns::util::details::printHex | ( | std::ostream & | out, |
T | value | ||
) |