BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlb::PrintStringHexDumper Struct Reference

#include <bdlb_print.h>

Public Member Functions

 PrintStringHexDumper (const char *data, int length)
 

Public Attributes

const char * d_data_p
 
int d_length
 

Detailed Description

Utility for hex dumping a blob to standard output streams. This class has operator<< defined for it, so it can be used as follows:

blob.resize(1024);
// ... fill up the blob with some data ...
bsl::cout << PrintStringHexDumper(blob.data(), blob.size())
<< bsl::endl;
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this vector.
Definition bslstl_vector.h:2664
VALUE_TYPE * data() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_vector.h:2587
Definition bslstl_vector.h:1025
void resize(size_type newSize)
Definition bslstl_vector.h:3616
Definition bdlb_print.h:288

Constructor & Destructor Documentation

◆ PrintStringHexDumper()

bdlb::PrintStringHexDumper::PrintStringHexDumper ( const char *  data,
int  length 
)
inline

Create a PrintStringHexDumper object that can insert to an output stream a formated (possibly multi-lined) hexadecimal representation the specified data of the specified length.

Member Data Documentation

◆ d_data_p

const char* bdlb::PrintStringHexDumper::d_data_p

◆ d_length

int bdlb::PrintStringHexDumper::d_length

The documentation for this struct was generated from the following file: