Public Member Functions | Public Attributes | List of all members
gnsstk::StringUtils::HexDumpDataConfig Class Reference

Detailed Description

Class for configuring the appearance of hexDumpData() output.

Definition at line 58 of file HexDumpDataConfig.hpp.

#include <HexDumpDataConfig.hpp>

Public Member Functions

std::string baseData () const
 Get the data radix ID. More...
 
std::string baseIndex () const
 Get the index radix ID. More...
 
unsigned computeLineSize (unsigned bytesOnLine, bool lastLine) const
 
 HexDumpDataConfig ()
 Initialize to some sensible defaults. More...
 
 HexDumpDataConfig (bool ashowIndex, bool ahexIndex, bool aupperHex, unsigned aidxDigits, const std::string &aindexSep, unsigned agroupBy, const std::string &agroupSep, unsigned agroup2By, const std::string &agroup2Sep, unsigned abytesPerLine, bool ashowText, char aseparator, const std::string &atextSep, bool aShowBaseData, bool aShowBaseIndex, const std::string &adataEndSep, const std::string &adataFinal)
 
 HexDumpDataConfig (bool ashowIndex, bool ahexIndex, bool aupperHex, unsigned aidxDigits, const std::string &aindexSep, unsigned agroupBy, const std::string &agroupSep, unsigned agroup2By, const std::string &agroup2Sep, unsigned abytesPerLine, bool ashowText, const std::string &apreText, const std::string &apostText, bool aShowBaseData, bool aShowBaseIndex, const std::string &adataEndSep, const std::string &adataFinal, const std::string &aprefix)
 
 HexDumpDataConfig (bool ashowIndex, bool ahexIndex, bool aupperHex, unsigned aidxDigits, unsigned aindexWS, unsigned agroupBy, unsigned agroupWS, unsigned agroup2By, unsigned agroup2WS, unsigned abytesPerLine, bool ashowText, char aseparator, unsigned atextWS, bool aShowBaseData=false, bool aShowBaseIndex=false)
 

Public Attributes

unsigned bytesPerLine
 
std::string dataEndSep
 text to put after last data on a line. More...
 
std::string dataFinal
 text to put after last of data. More...
 
unsigned group2By
 
std::string group2Sep
 text put between 2nd layer groups. More...
 
unsigned groupBy
 bytes of data to show between spaces. More...
 
std::string groupSep
 text put between groups of hex data. More...
 
bool hexIndex
 if true, use hex index numbers (else decimal). More...
 
unsigned idxDigits
 number of positions to use for index. More...
 
std::string indexSep
 text between index and data. More...
 
std::string postText
 text to put after ASCII. More...
 
std::string prefix
 text to put at the start of each line. More...
 
std::string preText
 text put between hex and ASCII. More...
 
bool showBaseData
 Show number base indicator for data. More...
 
bool showBaseIndex
 Show number base indicator for indices. More...
 
bool showIndex
 display index into string on each line. More...
 
bool showText
 
bool upperHex
 if true, use upper-case hex digits. More...
 

Constructor & Destructor Documentation

◆ HexDumpDataConfig() [1/4]

gnsstk::StringUtils::HexDumpDataConfig::HexDumpDataConfig ( )

Initialize to some sensible defaults.

Definition at line 51 of file HexDumpDataConfig.cpp.

◆ HexDumpDataConfig() [2/4]

gnsstk::StringUtils::HexDumpDataConfig::HexDumpDataConfig ( bool  ashowIndex,
bool  ahexIndex,
bool  aupperHex,
unsigned  aidxDigits,
unsigned  aindexWS,
unsigned  agroupBy,
unsigned  agroupWS,
unsigned  agroup2By,
unsigned  agroup2WS,
unsigned  abytesPerLine,
bool  ashowText,
char  aseparator,
unsigned  atextWS,
bool  aShowBaseData = false,
bool  aShowBaseIndex = false 
)

Set most fields in a traditional manner, where separators are a specified number of space characters.

See also
data member documentation for an explanation of arguments.

Definition at line 61 of file HexDumpDataConfig.cpp.

◆ HexDumpDataConfig() [3/4]

gnsstk::StringUtils::HexDumpDataConfig::HexDumpDataConfig ( bool  ashowIndex,
bool  ahexIndex,
bool  aupperHex,
unsigned  aidxDigits,
const std::string &  aindexSep,
unsigned  agroupBy,
const std::string &  agroupSep,
unsigned  agroup2By,
const std::string &  agroup2Sep,
unsigned  abytesPerLine,
bool  ashowText,
char  aseparator,
const std::string &  atextSep,
bool  aShowBaseData,
bool  aShowBaseIndex,
const std::string &  adataEndSep,
const std::string &  adataFinal 
)

Set fields using explicit strings for the separators.

See also
data member documentation for an explanation of arguments.

Definition at line 87 of file HexDumpDataConfig.cpp.

◆ HexDumpDataConfig() [4/4]

gnsstk::StringUtils::HexDumpDataConfig::HexDumpDataConfig ( bool  ashowIndex,
bool  ahexIndex,
bool  aupperHex,
unsigned  aidxDigits,
const std::string &  aindexSep,
unsigned  agroupBy,
const std::string &  agroupSep,
unsigned  agroup2By,
const std::string &  agroup2Sep,
unsigned  abytesPerLine,
bool  ashowText,
const std::string &  apreText,
const std::string &  apostText,
bool  aShowBaseData,
bool  aShowBaseIndex,
const std::string &  adataEndSep,
const std::string &  adataFinal,
const std::string &  aprefix 
)

Set fields using explicit strings for the separators.

See also
data member documentation for an explanation of arguments.

Definition at line 114 of file HexDumpDataConfig.cpp.

Member Function Documentation

◆ baseData()

std::string gnsstk::StringUtils::HexDumpDataConfig::baseData ( ) const

Get the data radix ID.

Definition at line 209 of file HexDumpDataConfig.cpp.

◆ baseIndex()

std::string gnsstk::StringUtils::HexDumpDataConfig::baseIndex ( ) const

Get the index radix ID.

Definition at line 197 of file HexDumpDataConfig.cpp.

◆ computeLineSize()

unsigned gnsstk::StringUtils::HexDumpDataConfig::computeLineSize ( unsigned  bytesOnLine,
bool  lastLine 
) const

Return the number of bytes on a line of hexDumpData output without the ASCII representation length. This is used to line up the ASCII dump.

Parameters
[in]bytesOnLineThe number of bytes on the line of output (which may be different from bytesPerLine when this function is used for the last line of output).
[in]lastLineIf true, the length of dataFinal will be added, otherwise the length of dataEndSep will be added.

Definition at line 138 of file HexDumpDataConfig.cpp.

Member Data Documentation

◆ bytesPerLine

unsigned gnsstk::StringUtils::HexDumpDataConfig::bytesPerLine

Number of bytes to display on a line of output (must be evenly divisible by both groupBy and group2By).

Definition at line 142 of file HexDumpDataConfig.hpp.

◆ dataEndSep

std::string gnsstk::StringUtils::HexDumpDataConfig::dataEndSep

text to put after last data on a line.

Definition at line 128 of file HexDumpDataConfig.hpp.

◆ dataFinal

std::string gnsstk::StringUtils::HexDumpDataConfig::dataFinal

text to put after last of data.

Definition at line 129 of file HexDumpDataConfig.hpp.

◆ group2By

unsigned gnsstk::StringUtils::HexDumpDataConfig::group2By

Number of groups to show per 2nd layer group (0=none, must be multiple of groupBy).

Definition at line 139 of file HexDumpDataConfig.hpp.

◆ group2Sep

std::string gnsstk::StringUtils::HexDumpDataConfig::group2Sep

text put between 2nd layer groups.

Definition at line 126 of file HexDumpDataConfig.hpp.

◆ groupBy

unsigned gnsstk::StringUtils::HexDumpDataConfig::groupBy

bytes of data to show between spaces.

Definition at line 124 of file HexDumpDataConfig.hpp.

◆ groupSep

std::string gnsstk::StringUtils::HexDumpDataConfig::groupSep

text put between groups of hex data.

Definition at line 125 of file HexDumpDataConfig.hpp.

◆ hexIndex

bool gnsstk::StringUtils::HexDumpDataConfig::hexIndex

if true, use hex index numbers (else decimal).

Definition at line 120 of file HexDumpDataConfig.hpp.

◆ idxDigits

unsigned gnsstk::StringUtils::HexDumpDataConfig::idxDigits

number of positions to use for index.

Definition at line 122 of file HexDumpDataConfig.hpp.

◆ indexSep

std::string gnsstk::StringUtils::HexDumpDataConfig::indexSep

text between index and data.

Definition at line 123 of file HexDumpDataConfig.hpp.

◆ postText

std::string gnsstk::StringUtils::HexDumpDataConfig::postText

text to put after ASCII.

Definition at line 131 of file HexDumpDataConfig.hpp.

◆ prefix

std::string gnsstk::StringUtils::HexDumpDataConfig::prefix

text to put at the start of each line.

Definition at line 127 of file HexDumpDataConfig.hpp.

◆ preText

std::string gnsstk::StringUtils::HexDumpDataConfig::preText

text put between hex and ASCII.

Definition at line 130 of file HexDumpDataConfig.hpp.

◆ showBaseData

bool gnsstk::StringUtils::HexDumpDataConfig::showBaseData

Show number base indicator for data.

Definition at line 132 of file HexDumpDataConfig.hpp.

◆ showBaseIndex

bool gnsstk::StringUtils::HexDumpDataConfig::showBaseIndex

Show number base indicator for indices.

Definition at line 133 of file HexDumpDataConfig.hpp.

◆ showIndex

bool gnsstk::StringUtils::HexDumpDataConfig::showIndex

display index into string on each line.

Definition at line 119 of file HexDumpDataConfig.hpp.

◆ showText

bool gnsstk::StringUtils::HexDumpDataConfig::showText

If true, show text of message (unprintable characters become '.'.

Definition at line 136 of file HexDumpDataConfig.hpp.

◆ upperHex

bool gnsstk::StringUtils::HexDumpDataConfig::upperHex

if true, use upper-case hex digits.

Definition at line 121 of file HexDumpDataConfig.hpp.


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


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:46