VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
makVrf::DtOctalValidator Class Reference

Validator which will validate and return octal values that can be used for mode code IFF validation.

Inheritance diagram for makVrf::DtOctalValidator:
Inheritance graph
[legend]

Public Member Functions

 DtOctalValidator (QObject *parent=nullptr)
 
virtual ~DtOctalValidator ()
 
virtual State validate (QString &, int &) const
 
virtual int pack (const QString &) const
 
virtual QString unpack (int, int digits=4) const
 

Constructor & Destructor Documentation

makVrf::DtOctalValidator::DtOctalValidator ( QObject parent = nullptr)
virtual makVrf::DtOctalValidator::~DtOctalValidator ( )
virtual

Member Function Documentation

virtual State makVrf::DtOctalValidator::validate ( QString &  ,
int  
) const
virtual

Makes sure that each digit is b/t 0 and 7 (and an integer)

virtual int makVrf::DtOctalValidator::pack ( const QString &  ) const
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.

virtual QString makVrf::DtOctalValidator::unpack ( int  ,
int  digits = 4 
) const
virtual

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)


The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)