26 :
m_nbits(8 * sizeof(uint32_t)),
72 uint8_t navail =
nbits;
74 if (navail == 0)
return false;
145 if (
m_nbits == 1)
return false;
199 if (option.name() ==
"nbits" ||
200 option.name() ==
"nmantissa" ||
201 option.name() ==
"scale" ||
202 option.name() ==
"signed" ||
203 option.name() ==
"rounding" ||
204 option.name() ==
"float")
224 if (option.name() ==
"nbits")
227 else if (option.name() ==
"nmantissa")
230 else if (option.name() ==
"scale")
231 return setScale (option.floatVal());
233 else if (option.name() ==
"signed")
236 else if (option.name() ==
"rounding")
239 else if (option.name() ==
"float")
240 return setFloat (option.intVal() != 0);
Describe how the contents of a PackedContainer are to be saved.
Hold information about an option setting request.
static bool isValidOption(const AuxDataOption &option)
Test to see if option is a recognized packing option.
uint8_t m_flags
Additional flags.
bool hasScale() const
Should floats be rescaled before writing?
bool setRounding(bool flag)
Set the rounding mode.
bool setNbits(uint8_t nbits)
Set the number of bits to be used for each element.
bool isSigned() const
Are elements being written as signed numbers?
bool setOption(const AuxDataOption &option)
Set a packing option.
bool setFloat(bool flag)
Set the floating-point flag.
bool setNmantissa(uint8_t nmantissa)
Set the number of mantissa bits used in the packed representation.
uint8_t nbits() const
The number of bits used to store each element.
uint8_t m_nmantissa
The number of bits for the mantissa of floating-point representations.
bool setScale(float scale)
Set the scale to use when packing floating-point data.
float m_scale
If nonzero, divide floating-point numbers by this before writing.
uint8_t nmantissa() const
The number of bits used for the mantissa portion of a float-point representation, excluding a sign bi...
bool setSigned(bool flag)
Set the signedness flag for the packed representation.
float scale() const
Return the scale for floating-point numbers.
PackedParameters()
Default constructor.
uint8_t m_nbits
The number of bits to use for each element.
uint8_t flags() const
Additional flags describing the packing.