april  1.0.0
...
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
april::AaTkString Struct Reference

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< AaTokentk_
 the list of token descriptors

Detailed Description

a tokenised string; contains the string itself and the list of tokens

Member Function Documentation

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.


The documentation for this struct was generated from the following files: