VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ghexdump.h File Reference

Synopsis: More...

#include "gdef.h"
#include <iostream>
#include <cstddef>
#include <iomanip>

Go to the source code of this file.

Classes

struct  G::HexdumpImp::hexdump_tohex
 Nibble-to-hex-digit functor. More...
 
struct  G::HexdumpImp::hexdump_toprintable
 Char-to-printable-ascii functor. More...
 
struct  G::HexdumpImp::hexdump_ostream_emitter
 An output adaptor to write to std::ostream. More...
 
struct  G::HexdumpImp::hexdump_streamable< N, T, Ttohex, Ttoprintable >
 A streamable class used by G::hexdump(). More...
 

Namespaces

 G
 Low-level classes for o/s services.
 
 G::HexdumpImp
 A private scope used for the implementation details of G::hexdump and G::hex_dump.
 

Functions

template<unsigned N, typename Tin , typename Temit , typename Ttohex , typename Ttoprintable >
void G::HexdumpImp::hexdump_imp (Tin begin, Tin end, Temit &emitter, unsigned int width, Ttohex tohex, Ttoprintable toprintable)
 
template<unsigned N, typename T , typename Ttohex , typename Ttoprintable >
std::ostream & G::HexdumpImp::operator<< (std::ostream &stream, const hexdump_streamable< N, T, Ttohex, Ttoprintable > &hd)
 
template<int N, typename T , typename Ttohex , typename Ttoprintable >
void G::hex_dump (std::ostream &out, T begin, T end, unsigned int address_width, const char *prefix, const char *space, const char *bar, unsigned int width, Ttohex tohex, Ttoprintable toprintable)
 Performs a hex dump to the given stream. More...
 
template<int N, typename T >
void G::hex_dump (std::ostream &out, T begin, T end, unsigned int address_width, const char *prefix, const char *space, const char *bar, unsigned int width)
 
template<int N, typename T >
void G::hex_dump (std::ostream &out, T begin, T end, unsigned int address_width, const char *prefix, const char *space, const char *bar)
 
template<int N, typename T >
void G::hex_dump (std::ostream &out, T begin, T end, unsigned int address_width)
 
template<int N, typename T >
void G::hex_dump (std::ostream &out, T begin, T end)
 convenience overloads...
 
template<int N, typename T >
void G::hex_dump (std::ostream &out, const T &str)
 
template<int N, typename T , typename Ttohex , typename Ttoprintable >
imp::hexdump_streamable< N, T,
Ttohex, Ttoprintable > 
G::hexdump (T begin, T end, unsigned int address_width, const char *prefix, const char *space, const char *bar, unsigned int width, Ttohex tohex, Ttoprintable toprintable)
 Returns a streamable object that does a hex dump. More...
 
template<int N, typename T >
imp::hexdump_streamable< N, T,
typename imp::hexdump_tohex,
typename
imp::hexdump_toprintable > 
G::hexdump (T begin, T end, unsigned int address_width, const char *prefix, const char *space, const char *bar, unsigned int width)
 
template<int N, typename T >
imp::hexdump_streamable< N, T,
typename imp::hexdump_tohex,
typename
imp::hexdump_toprintable > 
G::hexdump (T begin, T end, unsigned int address_width, const char *prefix, const char *space, const char *bar)
 
template<int N, typename T >
imp::hexdump_streamable< N, T,
typename imp::hexdump_tohex,
typename
imp::hexdump_toprintable > 
G::hexdump (T begin, T end, unsigned int address_width)
 
template<int N, typename T >
imp::hexdump_streamable< N, T,
typename imp::hexdump_tohex,
typename
imp::hexdump_toprintable > 
G::hexdump (T begin, T end)
 convenience overloads...
 
template<int N, typename T >
imp::hexdump_streamable< N,
typename T::const_iterator,
typename imp::hexdump_tohex,
typename
imp::hexdump_toprintable > 
G::hexdump (const T &seq)
 

Detailed Description

Synopsis:

G::hex_dump<16>( std::cout , data.begin() , data.end() ) ; // hex_dump
std::cout << G::hexdump<16>( data.begin() , data.end() ) ; // hexdump

Definition in file ghexdump.h.