ost::HEXdump(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

πŸ’– ost::HEXdump(3) πŸ’–

okay so bestie, welcome to the Library Functions Manual entry for ost::HEXdump β€” yes it's a 3-section page, yes it's a C++ class, and yes we're gonna get through it together, no cap ✨


🌸 NAME 🌸

ost::HEXdump β€” produces a dump of a buffer in a hexdump way with its code Ascii translation and relative buffer address. it's giving "old school hexdump(1) but make it a class" 🫢


✨ SYNOPSIS ✨

#include <applog.h>

πŸŽ€ Public Member Functions πŸŽ€

  • HEXdump(const unsigned char *buffer, int buff_len, int max_len=200) β€” the HEXdump constructor, we love a good constructor πŸ’…
  • virtual ~HEXdump() β€” the HEXdump destructor, rip king, virtual so it behaves πŸ‘‘
  • const char *c_str() const β€” const char* cast provided for conveneince (their spelling, not mine, but slay, i'm keeping it exactly as written 😭)
  • std::string str() β€” string cast provided for conveneince, same energy, same spelling 🌈

πŸ¦‹ Protected Attributes πŸ¦‹

  • std::string _str β€” output string, it's the whole vibe holder lowkey

πŸ’œ Friends πŸ’œ

  • std::ostream &operator<<(std::ostream &out, const HEXdump &hd) β€” operator <<, the friend that actually shows up for you 🫢

🌟 Detailed Description 🌟

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

for instance (and this is literally from the docs, don't @ me):

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

see how the bytes are up top and the ascii translation just vibes underneath? iconic honestly πŸ”₯


🧚 Constructor & Destructor Documentation 🧚

ost::HEXdump::HEXdump(const unsigned char *buffer, int buff_len, int max_len = 200)

HEXdump constructor. the main character of this whole page ✨

Parameters

  • buffer β€” buffer to be 'hexdumped'. yes with the quotes, they're very real about it
  • buff_len β€” buffer length
  • max_len β€” max number of bytes to be 'hexdumped'. Usefull to truncate output. mas_len=0 does prints all.
ok so heads up bestie β€” the original text literally writes mas_len=0 there (not max_len), and it says "does prints all". i am not fixing it, that's not my job, i'm just the messenger 🫢 also note: when it's 0, you get everything, no truncation, periodt.

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

HEXdump destructor. it's inline, it's virtual, it's saying goodbye with dignity πŸ’€


⭐ Member Function Documentation ⭐

const char* ost::HEXdump::c_str() const [inline]

const char* cast provided for conveneince. (convenience* but we're keeping the original spelling because the rules are the rules 🌸)

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

string cast provided for conveneince. same deal, same spelling, same slay πŸ’…


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

operator << β€” the friend function, doing the actual printing work, lowkey carrying the team 🫢

Parameters

  • hd β€” hexdump.

Returns

  • application logger stream

πŸ“ Member Data Documentation πŸ“

std::string ost::HEXdump::_str [protected]

output string. it's protected, it holds the output, it's literally the whole point, no notes πŸ’–


πŸ‘‘ Author πŸ‘‘

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


okay bestie that's the whole page, you ate that reading session, i'm so proud of you πŸ₯ΉπŸ’–

cute little sign-off: this absolute gem of a manual page comes from GNU CommonC++, dated Sun Dec 27 2020, and it lives at ost::HEXdump(3) in the manual β€” take care of her, she's doing her best βœ¨πŸŽ€

πŸ“¦ where this page comes from