#include <Convert.h>
Public Methods | |
| Convert () | |
| Standard constructor. | |
| QString | X10ToBinStr (IOInfoBin) |
| Converts a binary array into an string. More... | |
| QString | X10ToHexStr (IOInfoBin) |
| Converts a binary array into a string containing the corresponding hexadecimal value. More... | |
| bool | X10ToASCII (IOInfoBin io, char *cres, int asciiarraylen, int &length, bool singlechar=TRUE) |
| Converts a binary string into ASCII representation. More... | |
| bool | X10ToDec (IOInfoBin io, int &ires) |
| Converts a binary string into decimal representation. More... | |
| int | binStrToInt (QString) |
| Converts a string representing a binary number into an integer. More... | |
| IOInfoBin | binStrToX10 (int maxlen, const QString) |
| Converts a string representing a binary value into a binary array. More... | |
| QString | binStrToHexStr (const QString) |
| Converts a binary string into a hexadecimal string. More... | |
| bool | binStrToASCII (const QString, char *ascii, int arraymaxlen, int &len, bool singlechar=TRUE, int arrayoffset=0) |
| Converts a string representing a binary number into ASCII representation. More... | |
| bool | hexStrToInt (QString, int &) |
| Converts a string representing a hexadecimal number into an integer. More... | |
| IOInfoBin | hexStrToX10 (int, const QString) |
| Converts a string representing a hexadecimal number into a binary array. More... | |
| QString | hexStrToBinStr (int maxlen, const QString) |
| Converts a hexadecimal string into a binary string. More... | |
| bool | hexStrToASCII (const QString, char *ascii, int arraymaxlen, int &len, bool singlechar=TRUE) |
| Converts a string representing a hexadecimal number into ASCII representation. More... | |
| IOInfoBin | asciiToX10 (int maxlen, const char ascii) |
| Converts a single ASCII character into binary representation. More... | |
| IOInfoBin | asciiToX10 (int maxlen, const char *ascii, int asciilen) |
| Converts a string of ASCII characters into binary representation. More... | |
| QString | asciiToBinStr (int maxlen, const char ascii) |
| Converts a single ASCII character into a string representing the binary number. More... | |
| QString | asciiToBinStr (int maxlen, const char *ascii, int asciilen) |
| Converts an ASCII string into a string representing the binary number. More... | |
| QString | asciiToHexStr (const char ascii) |
| Converts a single ASCII character into hexadecimal representation. More... | |
| QString | asciiToHexStr (const char *ascii, int asciilen) |
| Converts an ASCII string into a string representing the hexadecimal number. More... | |
| void | resolveEscapes (QString estr, char *cres, int arraymaxlen, int &length) |
| Resolves the escape symbols in a string of ASCII characters. More... | |
| QString | asciiToReadableStr (const char *ascii, int asciilength) |
| Converts a string of ASCII characters into a readable string. More... | |
Static Public Methods | |
| QString | intToBinStr (int c, int len) |
| Converts an integer into a string representing the binary value of that integer. More... | |
This class is responsible for all sorts of conversions between int, QString, binary, hexadecimal, ASCII.
|
||||||||||||||||||||||||||||||||||||
|
Converts a binary string into ASCII representation.
|
|
|
Converts a binary array into an string.
|
|
|||||||||||||||
|
Converts a binary string into decimal representation.
|
|
|
Converts a binary array into a string containing the corresponding hexadecimal value.
|
|
||||||||||||||||||||||
|
Converts an ASCII string into a string representing the binary number.
|
|
|||||||||||||||
|
Converts a single ASCII character into a string representing the binary number.
|
|
|||||||||||||||
|
Converts an ASCII string into a string representing the hexadecimal number.
|
|
|
Converts a single ASCII character into hexadecimal representation.
|
|
|||||||||||||||
|
Converts a string of ASCII characters into a readable string. This means, escape characters are introduces where necessary.
|
|
||||||||||||||||||||||
|
Converts a string of ASCII characters into binary representation.
|
|
|||||||||||||||
|
Converts a single ASCII character into binary representation.
|
|
|||||||||||||||||||||||||||||||||||||||||||
|
Converts a string representing a binary number into ASCII representation.
|
|
|
Converts a binary string into a hexadecimal string.
|
|
|
Converts a string representing a binary number into an integer.
|
|
|||||||||||||||
|
Converts a string representing a binary value into a binary array. A binary array is an array of chars where each char represents one bit. The bit with the lowest index is the MSB. Value of 0 means 0, 1 means 1 and 2 means 'don't care' The end of the binary array is marked with a decimal '10'.
|
|
||||||||||||||||||||||||||||||||||||
|
Converts a string representing a hexadecimal number into ASCII representation.
|
|
|||||||||||||||
|
Converts a hexadecimal string into a binary string.
|
|
|||||||||||||||
|
Converts a string representing a hexadecimal number into an integer.
|
|
|||||||||||||||
|
Converts a string representing a hexadecimal number into a binary array.
|
|
|||||||||||||||
|
Converts an integer into a string representing the binary value of that integer.
|
|
|||||||||||||||||||||||||||||
|
Resolves the escape symbols in a string of ASCII characters. Example: \d is resolved into 0123456789 (digit)
|
1.2.9.1 written by Dimitri van Heesch,
© 1997-2001