XBinder
Version 2.9.x
|
These functions support working with a textual representation of values. More...
Functions | |
EXTERNRT int | rtxTxtMatchChar (OSCTXT *pctxt, OSUTF8CHAR ch, OSBOOL skipWs) |
This function matches the given character or logs and returns an error. More... | |
EXTERNRT int | rtxTxtMatchChars (OSCTXT *pctxt, const OSUTF8CHAR *chars, OSBOOL skipWs) |
This function matches the given characters or logs and returns an error. More... | |
EXTERNRT int | rtxTxtPeekChar (OSCTXT *pctxt, OSUTF8CHAR *pch, OSBOOL skipWs) |
This function determines the next character in the input. More... | |
EXTERNRT char | rtxTxtPeekChar2 (OSCTXT *pctxt, OSBOOL skipWs) |
This function determines the next character in the input. More... | |
EXTERNRT int | rtxTxtSkipWhitespace (OSCTXT *pctxt) |
This function skips any whitespace in the input. More... | |
EXTERNRT int | rtxTxtReadBigInt (OSCTXT *pctxt, char **ppvalue) |
This function reads an integer, using standard decimal notation, into a character string. More... | |
EXTERNRT int | rtxTxtReadInt8 (OSCTXT *pctxt, OSINT8 *pvalue) |
This function reads an integer, using standard decimal notation, into an 8-bit signed integer. More... | |
EXTERNRT int | rtxTxtReadInt16 (OSCTXT *pctxt, OSINT16 *pvalue) |
This function reads an integer, using standard decimal notation, into an 16-bit signed integer. More... | |
EXTERNRT int | rtxTxtReadInt32 (OSCTXT *pctxt, OSINT32 *pvalue) |
This function reads an integer, using standard decimal notation, into an 32-bit signed integer. More... | |
EXTERNRT int | rtxTxtReadInt64 (OSCTXT *pctxt, OSINT64 *pvalue) |
This function reads an integer, using standard decimal notation, into an 64-bit signed integer. More... | |
EXTERNRT int | rtxTxtReadUInt8 (OSCTXT *pctxt, OSUINT8 *pvalue) |
This function reads an integer, using standard decimal notation, into an 8-bit unsigned integer. More... | |
EXTERNRT int | rtxTxtReadUInt16 (OSCTXT *pctxt, OSUINT16 *pvalue) |
This function reads an integer, using standard decimal notation, into an 16-bit unsigned integer. More... | |
EXTERNRT int | rtxTxtReadUInt32 (OSCTXT *pctxt, OSUINT32 *pvalue) |
This function reads an integer, using standard decimal notation, into an 32-bit unsigned integer. More... | |
EXTERNRT int | rtxTxtReadUInt64 (OSCTXT *pctxt, OSUINT64 *pvalue) |
This function reads an integer, using standard decimal notation, into an 64-bit unsigned integer. More... | |
EXTERNRT int | rtxTxtWriteInt (OSCTXT *pctxt, OSINT32 value) |
This writes a 32-bit signed integer to the buffer using standard decimal (base 10) notation. More... | |
EXTERNRT int | rtxTxtWriteInt64 (OSCTXT *pctxt, OSINT64 value) |
This writes a 64-bit signed integer to the buffer using standard decimal (base 10) notation. More... | |
EXTERNRT int | rtxTxtWriteUInt (OSCTXT *pctxt, OSUINT32 value) |
This writes a 32-bit unsigned integer to the buffer using standard decimal (base 10) notation. More... | |
EXTERNRT int | rtxTxtWriteUInt64 (OSCTXT *pctxt, OSUINT64 value) |
This writes a 64-bit unsigned integer to the buffer using standard decimal (base 10) notation. More... | |
These functions support working with a textual representation of values.
Values of various C/C++ types can be written to, or read from, the context buffer, with the buffer holding a text representation.
EXTERNRT int rtxTxtMatchChar | ( | OSCTXT * | pctxt, |
OSUTF8CHAR | ch, | ||
OSBOOL | skipWs | ||
) |
This function matches the given character or logs and returns an error.
You may optionally choose to skip any leading whitespace.
pctxt | Pointer to context block structure. |
ch | The character to be matched. |
skipWs | If TRUE, skip any leading whitespace. |
EXTERNRT int rtxTxtMatchChars | ( | OSCTXT * | pctxt, |
const OSUTF8CHAR * | chars, | ||
OSBOOL | skipWs | ||
) |
This function matches the given characters or logs and returns an error.
You may optionally choose to skip any leading whitespace.
pctxt | Pointer to context block structure. |
chars | The characters to be matched. |
skipWs | If TRUE, skip any leading whitespace. |
EXTERNRT int rtxTxtPeekChar | ( | OSCTXT * | pctxt, |
OSUTF8CHAR * | pch, | ||
OSBOOL | skipWs | ||
) |
This function determines the next character in the input.
You may optionally skip any whitespace and peek at the first non-whitespace character. Skipping whitespace consumes it.
It is an error if EOF prevents a character from being returned.
pctxt | Pointer to OSCTXT structure |
pch | A pointer to a variable to receive the next character. |
EXTERNRT char rtxTxtPeekChar2 | ( | OSCTXT * | pctxt, |
OSBOOL | skipWs | ||
) |
This function determines the next character in the input.
You may optionally skip any whitespace and peek at the first non-whitespace character. Skipping whitespace consumes it.
It is an error if EOF prevents a character from being returned.
pctxt | Pointer to OSCTXT structure |
EXTERNRT int rtxTxtReadBigInt | ( | OSCTXT * | pctxt, |
char ** | ppvalue | ||
) |
This function reads an integer, using standard decimal notation, into a character string.
Leading whitespace is consumed.
This recognizes an optional minus sign, followed by 1 or more digits, with no superfluous leading zeros.
pctxt | Pointer to context block structure. |
ppvalue | Pointer to string to receive newly allocated string with decoded result. |
EXTERNRT int rtxTxtReadInt16 | ( | OSCTXT * | pctxt, |
OSINT16 * | pvalue | ||
) |
This function reads an integer, using standard decimal notation, into an 16-bit signed integer.
Leading whitespace is consumed.
This recognizes an optional minus sign, followed by 1 or more digits, with no superfluous leading zeros.
pctxt | Pointer to context block structure. |
pvalue | Pointer to 16-bit integer value to receive decoded result. |
EXTERNRT int rtxTxtReadInt32 | ( | OSCTXT * | pctxt, |
OSINT32 * | pvalue | ||
) |
This function reads an integer, using standard decimal notation, into an 32-bit signed integer.
Leading whitespace is consumed.
This recognizes an optional minus sign, followed by 1 or more digits, with no superfluous leading zeros.
pctxt | Pointer to context block structure. |
pvalue | Pointer to 32-bit integer value to receive decoded result. |
EXTERNRT int rtxTxtReadInt64 | ( | OSCTXT * | pctxt, |
OSINT64 * | pvalue | ||
) |
This function reads an integer, using standard decimal notation, into an 64-bit signed integer.
Leading whitespace is consumed.
This recognizes an optional minus sign, followed by 1 or more digits, with no superfluous leading zeros.
pctxt | Pointer to context block structure. |
pvalue | Pointer to 64-bit integer value to receive decoded result. |
EXTERNRT int rtxTxtReadInt8 | ( | OSCTXT * | pctxt, |
OSINT8 * | pvalue | ||
) |
This function reads an integer, using standard decimal notation, into an 8-bit signed integer.
Leading whitespace is consumed.
This recognizes an optional minus sign, followed by 1 or more digits, with no superfluous leading zeros.
pctxt | Pointer to context block structure. |
pvalue | Pointer to 8-bit integer value to receive decoded result. |
EXTERNRT int rtxTxtReadUInt16 | ( | OSCTXT * | pctxt, |
OSUINT16 * | pvalue | ||
) |
This function reads an integer, using standard decimal notation, into an 16-bit unsigned integer.
Leading whitespace is consumed.
This recognizes 1 or more digits, with no superfluous leading zeros.
pctxt | Pointer to context block structure. |
pvalue | Pointer to 16-bit unsigned integer value to receive decoded result. |
EXTERNRT int rtxTxtReadUInt32 | ( | OSCTXT * | pctxt, |
OSUINT32 * | pvalue | ||
) |
This function reads an integer, using standard decimal notation, into an 32-bit unsigned integer.
Leading whitespace is consumed.
This recognizes 1 or more digits, with no superfluous leading zeros.
pctxt | Pointer to context block structure. |
pvalue | Pointer to 32-bit unsigned integer value to receive decoded result. |
EXTERNRT int rtxTxtReadUInt64 | ( | OSCTXT * | pctxt, |
OSUINT64 * | pvalue | ||
) |
This function reads an integer, using standard decimal notation, into an 64-bit unsigned integer.
Leading whitespace is consumed.
This recognizes 1 or more digits, with no superfluous leading zeros.
pctxt | Pointer to context block structure. |
pvalue | Pointer to 64-bit unsigned integer value to receive decoded result. |
EXTERNRT int rtxTxtReadUInt8 | ( | OSCTXT * | pctxt, |
OSUINT8 * | pvalue | ||
) |
This function reads an integer, using standard decimal notation, into an 8-bit unsigned integer.
Leading whitespace is consumed.
This recognizes 1 or more digits, with no superfluous leading zeros.
pctxt | Pointer to context block structure. |
pvalue | Pointer to 8-bit unsigned integer value to receive decoded result. |
EXTERNRT int rtxTxtSkipWhitespace | ( | OSCTXT * | pctxt | ) |
This function skips any whitespace in the input.
pctxt | Pointer to OSCTXT structure |
EXTERNRT int rtxTxtWriteInt | ( | OSCTXT * | pctxt, |
OSINT32 | value | ||
) |
This writes a 32-bit signed integer to the buffer using standard decimal (base 10) notation.
A sign is used only for negative values.
pctxt | Pointer to context block structure. |
value | Value to be encoded. |
EXTERNRT int rtxTxtWriteInt64 | ( | OSCTXT * | pctxt, |
OSINT64 | value | ||
) |
This writes a 64-bit signed integer to the buffer using standard decimal (base 10) notation.
A sign is used only for negative values.
pctxt | Pointer to context block structure. |
value | Value to be encoded. |
EXTERNRT int rtxTxtWriteUInt | ( | OSCTXT * | pctxt, |
OSUINT32 | value | ||
) |
This writes a 32-bit unsigned integer to the buffer using standard decimal (base 10) notation.
No sign is used.
pctxt | Pointer to context block structure. |
value | Value to be encoded. |
EXTERNRT int rtxTxtWriteUInt64 | ( | OSCTXT * | pctxt, |
OSUINT64 | value | ||
) |
This writes a 64-bit unsigned integer to the buffer using standard decimal (base 10) notation.
No sign is used.
pctxt | Pointer to context block structure. |
value | Value to be encoded. |