![]() |
VR-Forces Developer's Guide
|
Validator which will validate and return octal values that can be used for mode code IFF validation.

Public Member Functions | |
| DtOctalValidator (QObject *parent=nullptr) | |
| virtual | ~DtOctalValidator () override |
| virtual State | validate (QString &, int &) const override |
| virtual int | pack (const QString &) const |
| virtual QString | unpack (int, int digits=4) const |
| makVrf::DtOctalValidator::DtOctalValidator | ( | QObject * | parent = nullptr | ) |
|
overridevirtual |
|
overridevirtual |
Makes sure that each digit is b/t 0 and 7 (and an integer)
|
virtual |
Packs the given integer value into expected IFF octal representation and returns the packed value. The packing goes in reverse order according to the spec so, for example, if the number is 2376, it would be packed 6732 using 3 bits for each element.
Opposite of pack. Takes an integer and unpacks it to the correct octal representation as entered above. Since IFF uses (at the most) 4 values (12 bits), this will only decode the first 12 bits. Pass in the number of digits to unpack (default is 4)