Declaration¶
Source position: syshelph.inc line 1281
type
TQWordHelper = type helper for QWord
const
MaxValue = High(qword);
MinValue = Low(qword);
MaxBit = High(TQwordBitIndex);
MinBit = Low(TQwordBitIndex);
MaxNibble = High(TQwordNibbleIndex);
MinNibble = Low(TQwordNibbleIndex);
MaxByte = High(TQwordByteIndex);
MinByte = Low(TQwordByteIndex);
MaxWord = High(TQwordWordIndex);
MinWord = Low(TQwordWordIndex);
MaxDword = High(TQwordDwordIndex);
MinDword = Low(TQwordDwordIndex);
public
class function Parse : QWord;
class function Size : Integer;
class function ToString(const AValue: QWord) : string; overload;
function ToString : string; overload;
class function TryParse : Boolean;
function ToBoolean : Boolean;
function ToDouble : Double;
function ToExtended : Extended;
function ToBinString : string;
function ToHexString(const AMinDigits: Integer) : string; overload;
function ToHexString : string; overload;
function ToSingle : Single;
function SetBit : QWord;
function ClearBit : QWord;
function ToggleBit : QWord;
function TestBit : Boolean;
procedure Clear;
function HighestSetBitPos : Int8;
function LowestSetBitPos : Int8;
function SetBitsCount : Byte;
property Bits[aIndex : TQwordBitIndex = 0..63]: Boolean; {rw}
property Nibbles[aIndex : TQwordNibbleIndex = 0..15]: nibble; {rw}
property Bytes[aIndex : TQwordByteIndex = 0..7]: Byte; {rw}
property Words[aIndex : TQwordWordIndex = 0..3]: Word; {rw}
property DWords[aIndex : TQwordDwordIndex = 0..1]: DWord; {rw}
end;
Inheritance¶
Description¶
TQWordHelper contains some auxiliary routines for a QWord-typed ordinal value. It consists mainly of conversion routines to and from other types.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| Bits | public | Read or write a bit. |
| Bytes | public | Read or write a byte. |
| DWords | public | Read or write a dword. |
| Nibbles | public | Read or write a nibble. |
| Words | public | Read or write a word. |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Clear | public | Set value to 0. |
| ClearBit | public | Set bit to 0. |
| HighestSetBitPos | public | Return the position of the leftmost bit set. |
| LowestSetBitPos | public | Return the position of the rightmost bit set. |
| Parse | public | Convert from a string. |
| SetBit | public | Set bit to 1. |
| SetBitsCount | public | Count number of bits set. |
| Size | public | Size, in bytes, of the QWord value. |
| TestBit | public | Check bit. |
| ToBinString | public | Convert to a binary string representation. |
| ToBoolean | public | Convert to a boolean value. |
| ToDouble | public | Convert to a double-sized floating point value. |
| ToExtended | public | Convert to an extended-sized floating point value. |
| ToggleBit | public | Invert bit. |
| ToHexString | public | Convert to a hexadecimal string representation. |
| ToSingle | public | Convert to an single-sized floating point value. |
| ToString | public | Convert the value to string. |
| TryParse | public | Try to convert a string to a QWord, report success or failure. |
See also¶
| Name | Description |
|---|---|
| TStringHelper | Helper type for strings. |
| TShortIntHelper | Helper for a ShortInt-typed ordinal value. |
| TSmallIntHelper | Helper for a SmallInt-typed ordinal value. |
| TWordHelper | Helper for a Word-typed ordinal value. |
| TCardinalHelper | Helper for a Cardinal-typed ordinal value. |
| TIntegerHelper | Helper for a Integer-typed ordinal value. |
| TInt64Helper | Helper for a Int64-typed ordinal value. |
| TByteHelper | Helper for a byte-typed ordinal value. |
| TNativeIntHelper | Helper for a NativeInt-typed ordinal value. |
| TNativeUIntHelper | Helper for a NativeUInt-typed ordinal value. |