Parent template for the byte array formatters. More...
#include <formatters.hpp>
Public Member Functions | |
ByteArrayFormatter () | |
ByteArrayFormatter< Byte, N > & | operator() (const Array< Byte, N > &array) |
ByteArrayFormatter< Byte, N > & | operator() (const Stencil< Array< Byte, N > > &stencil) |
ByteArrayFormatter< Byte, N > & | operator() (typename Array< Byte, N >::const_iterator begin_iter, typename Array< Byte, N >::const_iterator end_iter) |
Formats on a window of the array. More... | |
virtual | ~ByteArrayFormatter () |
Private Attributes | |
Array< Byte, N >::const_iterator | begin_iterator |
Array< Byte, N >::const_iterator | end_iterator |
bool | ready_to_format |
Friends | |
template<typename OutputStream , typename CharType , size_t M> | |
OutputStream & | operator<< (OutputStream &ostream, const ByteArrayFormatter< CharType, M > &formatter) |
Parent template for the byte array formatters.
We dont accept arguments for this class, it is simply designed to present byte arrays in hex format byte by byte. If you want specialised formatting for the character array, iterate over it with the Format<char> (or signed/unsigned char) class.
It will also accept stencils which have an underlying array of the required type.
Do not use this class directly, rather call it via either the Array or Format classes explicitly. This makes the code more readable. e.g.
Byte | : byte type, signed char/char/unsigned char. |
N | : the size of the container to be formatted. |
Definition at line 119 of file array/formatters.hpp.
|
inline |
Default constructor that simply sets up the formatter for use. There is only one formatting style for this - a byte by byte view of the array in hex format, so we don't accept any arguments. If you want specialised formatting for your array, iterate it element by element with the Format<signed char> class.
Definition at line 131 of file array/formatters.hpp.
|
inlinevirtual |
Definition at line 183 of file array/formatters.hpp.
|
inline |
The format operator. Use this when inserting into a stream. It returns a template on which the stream will perform the formatting to create the requested output.
array | : the array to format. |
Definition at line 140 of file array/formatters.hpp.
|
inline |
The format operator. Use this when inserting into a stream. It returns a template on which the stream will perform the formatting to create the requested output.
stencil | : a stencil on an underlying array of the requisite type. |
Definition at line 154 of file array/formatters.hpp.
|
inline |
Formats on a window of the array.
Format over the window specified.
begin_iter | : point in the array to begin formatting from. |
end_iter | : point in the array to begin formatting to. |
StandardException | : throws if indices are out of range [debug mode only]. |
Definition at line 172 of file array/formatters.hpp.
|
friend |
Insertion operator for sending the formatter (for character arrays) to an output stream.
OutputStream | : the type of the output stream to be inserted into. |
M | : the size of the container to be formatted. |
ostream | : the output stream. |
formatter | : the formatter to be inserted. |
StandardException | : throws if the formatter is used multiply in one stream operation [debug mode only]. |
Definition at line 207 of file array/formatters.hpp.
|
private |
Definition at line 199 of file array/formatters.hpp.
|
private |
Definition at line 200 of file array/formatters.hpp.
|
private |
Definition at line 201 of file array/formatters.hpp.