52 : showIndex(true), hexIndex(true), upperHex(false),
53 idxDigits(4), indexSep(
": "), groupBy(1), groupSep(
" "),
54 group2By(8), group2Sep(
" "), bytesPerLine(16),
55 showText(true), preText(
" "),
56 showBaseData(false), showBaseIndex(false)
62 unsigned aidxDigits,
unsigned aindexWS,
63 unsigned agroupBy,
unsigned agroupWS,
64 unsigned agroup2By,
unsigned agroup2WS,
65 unsigned abytesPerLine,
bool ashowText,
66 char aseparator,
unsigned atextWS,
67 bool aShowBaseData,
bool aShowBaseIndex)
68 : showIndex(ashowIndex), hexIndex(ahexIndex),
69 upperHex(aupperHex), idxDigits(aidxDigits),
70 groupBy(agroupBy), group2By(agroup2By),
71 bytesPerLine(abytesPerLine), showText(ashowText),
72 showBaseData(aShowBaseData), showBaseIndex(aShowBaseIndex)
74 indexSep =
":" + std::string(aindexWS,
' ');
75 groupSep = std::string(agroupWS,
' ');
77 preText = std::string(atextWS,
' ');
81 postText = std::string(1, aseparator);
88 unsigned aidxDigits,
const std::string& aindexSep,
89 unsigned agroupBy,
const std::string& agroupSep,
90 unsigned agroup2By,
const std::string& agroup2Sep,
91 unsigned abytesPerLine,
bool ashowText,
92 char aseparator,
const std::string& atextSep,
93 bool aShowBaseData,
bool aShowBaseIndex,
94 const std::string& adataEndSep,
95 const std::string& adataFinal)
96 : showIndex(ashowIndex), hexIndex(ahexIndex),
97 upperHex(aupperHex), idxDigits(aidxDigits),
98 groupBy(agroupBy), group2By(agroup2By),
99 bytesPerLine(abytesPerLine), showText(ashowText),
100 indexSep(aindexSep), groupSep(agroupSep), group2Sep(agroup2Sep),
101 showBaseData(aShowBaseData), showBaseIndex(aShowBaseIndex),
102 dataEndSep(adataEndSep), dataFinal(adataFinal)
108 postText = std::string(1, aseparator);
115 unsigned aidxDigits,
const std::string& aindexSep,
116 unsigned agroupBy,
const std::string& agroupSep,
117 unsigned agroup2By,
const std::string& agroup2Sep,
118 unsigned abytesPerLine,
bool ashowText,
119 const std::string& apreText,
120 const std::string& apostText,
121 bool aShowBaseData,
bool aShowBaseIndex,
122 const std::string& adataEndSep,
123 const std::string& adataFinal,
124 const std::string& aprefix)
125 : showIndex(ashowIndex), hexIndex(ahexIndex),
126 upperHex(aupperHex), idxDigits(aidxDigits),
127 groupBy(agroupBy), group2By(agroup2By),
128 bytesPerLine(abytesPerLine), showText(ashowText),
129 indexSep(aindexSep), groupSep(agroupSep), group2Sep(agroup2Sep),
130 preText(apreText), postText(apostText),
131 showBaseData(aShowBaseData), showBaseIndex(aShowBaseIndex),
132 dataEndSep(adataEndSep), dataFinal(adataFinal), prefix(aprefix)
142 unsigned linesize =
prefix.length();
153 linesize += bytesThisLine * 2;
157 linesize += (bytesThisLine / this->
groupBy) * 2;
159 if (bytesThisLine % this->
groupBy)
167 w2 += ((bytesThisLine / this->
group2By) -
169 ((bytesThisLine % this->
group2By) == 0 ? 1 : 0));
176 w1 += (bytesThisLine / this->
groupBy) - w2 - 1;
181 linesize += this->
groupSep.length() * w1;
186 linesize += this->
group2Sep.length() * w2;