a tokenised string; contains the string itself and the list of tokens More...
#include <apriltokenizer.h>
Public Member Functions | |
QString | getToken (int i) const |
get the string as described by the token i | |
QString | getToken (const AaToken &tk) const |
get the string as described by the token i | |
bool | isString (const QString &s_match, int i) const |
check if the provided string matches token i | |
bool | isString (int i) const |
check if the token is a string | |
bool | isString (const AaToken &tk) const |
check if the token is a string | |
bool | isInteger (int i) const |
check if the token is an integer | |
bool | isInteger (const AaToken &tk) const |
check if the token is an integer | |
bool | isHexInteger (int i) const |
check if the token is an integer | |
bool | isHexInteger (const AaToken &tk) const |
check if the token is an integer |
Public Attributes | |
QString | s_ |
the string | |
QVector< AaToken > | tk_ |
the list of token descriptors |
a tokenised string; contains the string itself and the list of tokens
bool AaTkString::isHexInteger | ( | int | i | ) | const |
check if the token is an integer
The function uses only the flags to guess the result.
bool AaTkString::isHexInteger | ( | const AaToken & | tk | ) | const |
check if the token is an integer
The function uses only the flags to guess the result.
bool AaTkString::isInteger | ( | int | i | ) | const |
check if the token is an integer
The function uses only the flags to guess the result.
bool AaTkString::isInteger | ( | const AaToken & | tk | ) | const |
check if the token is an integer
The function uses only the flags to guess the result.
bool AaTkString::isString | ( | const QString & | s_match, |
int | i | ||
) | const |
check if the provided string matches token i
It is asserted that the string to querry is all-lower case; it is also asserted that the string contains only letters (no digits, no separators or other characters). Neither the token nor the string to match are trimmed (white spaces are not ignored).
The function uses the flags as much as it can to avoid a string comparation and return a false result.
bool AaTkString::isString | ( | int | i | ) | const |
check if the token is a string
It is asserted that the string to querry is all-lower case; it is also asserted that the string contains only letters (no digits, no separators or other characters).
The function uses only the flags to guess the result.
bool AaTkString::isString | ( | const AaToken & | tk | ) | const |
check if the token is a string
It is asserted that the string to querry is all-lower case; it is also asserted that the string contains only letters (no digits, no separators or other characters).
The function uses only the flags to guess the result.