populate method

SmvType populate({
  1. required LogicValue sign,
  2. required LogicValue magnitude,
})

Populates the SignMagnitudeValue with the given sign and magnitude, then performs additional validation.

Implementation

SmvType populate({required LogicValue sign, required LogicValue magnitude}) {
  if (_hasPopulated) {
    throw RohdHclException('SignMagnitudeValuePopulator: already populated');
  }
  _hasPopulated = true;

  return _unpopulated
    ..sign = sign
    ..magnitude = magnitude;
}