populate method

FpvType populate({
  1. required LogicValue sign,
  2. required LogicValue exponent,
  3. required LogicValue mantissa,
})

Populates the FloatingPointValue with the given sign, exponent, and mantissa, then performs additional validation.

Implementation

FpvType populate(
    {required LogicValue sign,
    required LogicValue exponent,
    required LogicValue mantissa}) {
  if (_hasPopulated) {
    throw RohdHclException('FloatingPointPopulator: already populated');
  }
  _hasPopulated = true;

  return _unpopulated
    ..sign = sign
    ..exponent = exponent
    ..mantissa = mantissa
    // ignore: invalid_use_of_protected_member, invalid_use_of_visible_for_overriding_member
    ..validate();
}