GP-2767 Structured pieces

This commit is contained in:
caheckman 2022-10-27 16:43:58 -04:00
parent b707c2ea6b
commit 535ac7c08d
29 changed files with 834 additions and 210 deletions

View file

@ -693,6 +693,19 @@ void PrintLanguage::setIntegerFormat(const string &nm)
mods |= mod; // Set any new force
}
/// This is used if a value is extracted from a structured data-type, but the natural name is not available.
/// An artificial name is generated given just the offset into the data-type and the size in bytes.
/// \param off is the byte offset into the data-type
/// \param size is the number of bytes in the extracted value
/// \return a string describing the artificial field
string PrintLanguage::unnamedField(int4 off,int4 size)
{
ostringstream s;
s << '_' << dec << off << '_' << size << '_';
return s.str();
}
/// Count '0' and '9' digits base 10. Count '0' and 'f' digits base 16.
/// The highest count is the preferred base.
/// \param val is the given integer