TF++, Miscellaneous classes and modules in C++:

◆ hexdump() [2/2]

template<class C >
std::ostream& tfxx::util::hexdump ( const C &  v,
std::ostream &  os = std::cout,
const char &  c = '.',
const unsigned int &  n = 16 
)

output hex dump of any object.

Parameters
[in]vstructure to dump
[in]osoutput stream to which hex dump will be sent
[in]ccharacter to be used for non-printable characters
[in]nnumber of bytes per line
Returns
return stream os

Definition at line 78 of file hexdump.h.

References hexdump().

80  {
81  // provide pointer to object
82  //const unsigned char* p=reinterpret_cast<const unsigned char *>(&v);
83  // size of object
84  const unsigned int size=sizeof(v);
85  // call raw memory hex dump
86  hexdump(&v, size, os, c, n);
87  return os;
88  } // std::ostream& hexdump(const C& v, std::ostream& os=std::cout,
std::ostream & hexdump(const C &v, std::ostream &os=std::cout, const char &c='.', const unsigned int &n=16)
output hex dump of any object.
Definition: hexdump.h:78
Here is the call graph for this function: