foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
pfc::format_hexdump

#include <string_base.h>

Public Member Functions

 format_hexdump (const void *p_buffer, t_size p_bytes, const char *p_spacing=" ")
 
const char * get_ptr () const
 
 operator const char * () const
 
const char * toString () const
 

Private Attributes

string_formatter m_formatter
 

Detailed Description

Definition at line 618 of file string_base.h.

Constructor & Destructor Documentation

pfc::format_hexdump::format_hexdump ( const void *  p_buffer,
t_size  p_bytes,
const char *  p_spacing = " " 
)

Definition at line 655 of file string_base.cpp.

656 {
657  t_size n;
658  const t_uint8 * buffer = (const t_uint8*)p_buffer;
659  for(n=0;n<p_bytes;n++)
660  {
661  if (n > 0 && p_spacing != 0) m_formatter << p_spacing;
662  m_formatter << format_hex(buffer[n],2);
663  }
664 }
uint8_t t_uint8
Definition: int_types.h:9
string_formatter m_formatter
Definition: string_base.h:627
size_t t_size
Definition: int_types.h:48

Member Function Documentation

const char* pfc::format_hexdump::get_ptr ( ) const
inline

Definition at line 623 of file string_base.h.

623 {return m_formatter;}
string_formatter m_formatter
Definition: string_base.h:627
pfc::format_hexdump::operator const char * ( ) const
inline

Definition at line 624 of file string_base.h.

624 {return m_formatter;}
string_formatter m_formatter
Definition: string_base.h:627
const char* pfc::format_hexdump::toString ( ) const
inline

Definition at line 625 of file string_base.h.

625 {return m_formatter;}
string_formatter m_formatter
Definition: string_base.h:627

Field Documentation

string_formatter pfc::format_hexdump::m_formatter
private

Definition at line 627 of file string_base.h.


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