---
name: "ost_HEXdump"
section: "3"
platform: "linux"
package: "libcommoncpp2-doc"
version: "1.8.1-10"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/ost_HEXdump"
---

# ost\_HEXdump(3)

Produces a dump of a buffer in a hexdump way with its code Ascii translation and relative buffer address.

## NAME

ost::HEXdump - Produces a dump of a buffer in a hexdump way with its code Ascii translation and relative buffer address.

## SYNOPSIS

`#include <applog.h>`

### Public Member Functions

**HEXdump** (const unsigned char \*buffer, int buff\_len, int max\_len=200)\
 **HEXdump** constructor.  virtual **~HEXdump** ()\
 **HEXdump** destructor.  const char \* **c\_str** () const\
 const char\* cast provided for conveneince.  std::string **str** ()\
 string cast provided for conveneince.

### Protected Attributes

std::string **\_str**\
 output string

### Friends

std::ostream & **operator\<\<** (std::ostream &out, const **HEXdump** &hd)\
 operator \<\<

## Detailed Description

Produces a dump of a buffer in a hexdump way with its code Ascii translation and relative buffer address.

For instance: 0000000 - 77 98 21 49 0e 00 05 00 40 1c 01 1c 2f 00 00 00 w.!I......./...

## Constructor & Destructor Documentation

### ost::HEXdump::HEXdump (const unsigned char \* buffer, int buff\_len, int max\_len = `200`)

**HEXdump** constructor.

**Parameters**

*buffer* buffer to be 'hexdumped' \
 *buff\_len* buffer length \
 *max\_len* max number of bytes to be 'hexdumped'. Usefull to truncate output. mas\_len=0 does prints all.

### virtual ost::HEXdump::~HEXdump ()` [inline]`, ` [virtual]`

**HEXdump** destructor.

## Member Function Documentation

### const char\* ost::HEXdump::c\_str () const` [inline]`

const char\* cast provided for conveneince.

### std::string ost::HEXdump::str ()` [inline]`

string cast provided for conveneince.

## Friends And Related Function Documentation

### std::ostream& operator\<\< (std::ostream & out, const HEXdump & hd)` [friend]`

operator \<\<

**Parameters**

*hd* hexdump.

**Returns**

application logger stream

## Member Data Documentation

### std::string ost::HEXdump::\_str` [protected]`

output string

## Author

Generated automatically by Doxygen for GNU CommonC++ from the source code.
