HexDumpDataConfig.hpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
44 #ifndef GNSSTK_HEXDUMPDATACONFIG_HPP
45 #define GNSSTK_HEXDUMPDATACONFIG_HPP
46 
47 namespace gnsstk
48 {
49  namespace StringUtils
50  {
51  // All the functionality here is inlined since they are
52  // farily small functions.
53 
55 
56 
59  {
60  public:
68  HexDumpDataConfig(bool ashowIndex, bool ahexIndex, bool aupperHex,
69  unsigned aidxDigits, unsigned aindexWS,
70  unsigned agroupBy, unsigned agroupWS,
71  unsigned agroup2By, unsigned agroup2WS,
72  unsigned abytesPerLine, bool ashowText,
73  char aseparator, unsigned atextWS,
74  bool aShowBaseData = false,
75  bool aShowBaseIndex = false);
79  HexDumpDataConfig(bool ashowIndex, bool ahexIndex, bool aupperHex,
80  unsigned aidxDigits, const std::string& aindexSep,
81  unsigned agroupBy, const std::string& agroupSep,
82  unsigned agroup2By, const std::string& agroup2Sep,
83  unsigned abytesPerLine, bool ashowText,
84  char aseparator, const std::string& atextSep,
85  bool aShowBaseData, bool aShowBaseIndex,
86  const std::string& adataEndSep,
87  const std::string& adataFinal);
91  HexDumpDataConfig(bool ashowIndex, bool ahexIndex, bool aupperHex,
92  unsigned aidxDigits, const std::string& aindexSep,
93  unsigned agroupBy, const std::string& agroupSep,
94  unsigned agroup2By, const std::string& agroup2Sep,
95  unsigned abytesPerLine, bool ashowText,
96  const std::string& apreText,
97  const std::string& apostText,
98  bool aShowBaseData, bool aShowBaseIndex,
99  const std::string& adataEndSep,
100  const std::string& adataFinal,
101  const std::string& aprefix);
112  unsigned computeLineSize(unsigned bytesOnLine,
113  bool lastLine) const;
115  std::string baseIndex() const;
117  std::string baseData() const;
118 
119  bool showIndex;
120  bool hexIndex;
121  bool upperHex;
122  unsigned idxDigits;
123  std::string indexSep;
124  unsigned groupBy;
125  std::string groupSep;
126  std::string group2Sep;
127  std::string prefix;
128  std::string dataEndSep;
129  std::string dataFinal;
130  std::string preText;
131  std::string postText;
134 
136  bool showText;
139  unsigned group2By;
142  unsigned bytesPerLine;
143  }; // class HexDumpDataConfig
144 
146 
147  } // namespace StringUtils
148 } // namespace gnsstk
149 
150 #endif // GNSSTK_HEXDUMPDATACONFIG_HPP
gnsstk::StringUtils::HexDumpDataConfig::postText
std::string postText
text to put after ASCII.
Definition: HexDumpDataConfig.hpp:131
gnsstk::StringUtils::HexDumpDataConfig
Class for configuring the appearance of hexDumpData() output.
Definition: HexDumpDataConfig.hpp:58
gnsstk::StringUtils::HexDumpDataConfig::indexSep
std::string indexSep
text between index and data.
Definition: HexDumpDataConfig.hpp:123
gnsstk::StringUtils::HexDumpDataConfig::groupSep
std::string groupSep
text put between groups of hex data.
Definition: HexDumpDataConfig.hpp:125
gnsstk::StringUtils::HexDumpDataConfig::prefix
std::string prefix
text to put at the start of each line.
Definition: HexDumpDataConfig.hpp:127
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::StringUtils::HexDumpDataConfig::preText
std::string preText
text put between hex and ASCII.
Definition: HexDumpDataConfig.hpp:130
gnsstk::StringUtils::HexDumpDataConfig::groupBy
unsigned groupBy
bytes of data to show between spaces.
Definition: HexDumpDataConfig.hpp:124
gnsstk::StringUtils::HexDumpDataConfig::baseIndex
std::string baseIndex() const
Get the index radix ID.
Definition: HexDumpDataConfig.cpp:197
gnsstk::StringUtils::HexDumpDataConfig::showText
bool showText
Definition: HexDumpDataConfig.hpp:136
gnsstk::StringUtils::HexDumpDataConfig::idxDigits
unsigned idxDigits
number of positions to use for index.
Definition: HexDumpDataConfig.hpp:122
gnsstk::StringUtils::HexDumpDataConfig::group2Sep
std::string group2Sep
text put between 2nd layer groups.
Definition: HexDumpDataConfig.hpp:126
gnsstk::StringUtils::HexDumpDataConfig::showIndex
bool showIndex
display index into string on each line.
Definition: HexDumpDataConfig.hpp:119
gnsstk::StringUtils::HexDumpDataConfig::showBaseIndex
bool showBaseIndex
Show number base indicator for indices.
Definition: HexDumpDataConfig.hpp:133
gnsstk::StringUtils::HexDumpDataConfig::HexDumpDataConfig
HexDumpDataConfig()
Initialize to some sensible defaults.
Definition: HexDumpDataConfig.cpp:51
gnsstk::StringUtils::HexDumpDataConfig::bytesPerLine
unsigned bytesPerLine
Definition: HexDumpDataConfig.hpp:142
gnsstk::StringUtils::HexDumpDataConfig::baseData
std::string baseData() const
Get the data radix ID.
Definition: HexDumpDataConfig.cpp:209
gnsstk::StringUtils::HexDumpDataConfig::group2By
unsigned group2By
Definition: HexDumpDataConfig.hpp:139
gnsstk::StringUtils::HexDumpDataConfig::showBaseData
bool showBaseData
Show number base indicator for data.
Definition: HexDumpDataConfig.hpp:132
gnsstk::StringUtils::HexDumpDataConfig::computeLineSize
unsigned computeLineSize(unsigned bytesOnLine, bool lastLine) const
Definition: HexDumpDataConfig.cpp:138
gnsstk::StringUtils::HexDumpDataConfig::upperHex
bool upperHex
if true, use upper-case hex digits.
Definition: HexDumpDataConfig.hpp:121
gnsstk::StringUtils::HexDumpDataConfig::dataEndSep
std::string dataEndSep
text to put after last data on a line.
Definition: HexDumpDataConfig.hpp:128
gnsstk::StringUtils::HexDumpDataConfig::dataFinal
std::string dataFinal
text to put after last of data.
Definition: HexDumpDataConfig.hpp:129
gnsstk::StringUtils::HexDumpDataConfig::hexIndex
bool hexIndex
if true, use hex index numbers (else decimal).
Definition: HexDumpDataConfig.hpp:120


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