AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
ATokenizer Class Reference

Classes#

struct  Hexable
 Reads unsigned integer number + flag the read value is marked as hex (prefixed with 0x) More...
 

Public Member Functions#

 ATokenizer (_< IInputStream > inputStream)
 
bool isEof () const
 
 ATokenizer (const AString &fromString)
 
const std::string & readString ()
 Reads string while isalnum == true.
 
template<aui::predicate< char > Callable>
const std::string & readStringWhile (Callable pred)
 Reads string while pred(char) == true.
 
const std::string & readString (size_t n)
 Reads n symbols.
 
const std::string & readString (const ASet< char > &applicableChars)
 Reads string while isalnum == true and characters contain in applicableChars.
 
char readChar ()
 Reads character.
 
void reverseByte ()
 Rejects the last read byte and return it into the "stream". Applicable for parsing algorithms.
 
float readFloat ()
 Reads float point number.
 
int64_t readLongInt ()
 Reads integer number.
 
int readInt ()
 Reads integer number.
 
unsigned readUInt ()
 Reads unsigned integer number.
 
Hexable< unsigned > readUIntX ()
 
char getLastCharacter ()
 
int getRow () const
 Get row counter value. Applicable for error reporting.
 
int getColumn () const
 Get column counter value. Applicable for error reporting.
 
void skipUntilUnescaped (char c)
 Skips character until unescaped c.
 
void skipUntil (char c)
 Skips character until c.
 
const std::string & readStringUntilUnescaped (char c)
 Reads string until unescaped c.
 
const std::string & readStringUntilUnescaped (const ASet< char > &characters)
 Reads string until unescaped c.
 
void readStringUntilUnescaped (std::string &out, char c)
 Reads string until unescaped c.
 
void readStringUntilUnescaped (std::string &out, const ASet< char > &characters)
 Reads string until unescaped c.
 
glm::vec2 readVec2 ()
 reads 2 floats divided by any symbol.
 

Detailed Description#

Examples
examples/7guis/cells/src/Formula.cpp.

Member Function Documentation#

◆ getColumn()#

int ATokenizer::getColumn ( ) const
inline
Returns
column counter

◆ getLastCharacter()#

char ATokenizer::getLastCharacter ( )
inline
Returns
last read byte. Applicable with ATokenizer::reverseByte()

◆ getRow()#

int ATokenizer::getRow ( ) const
inline
Returns
row counter

◆ readChar()#

char ATokenizer::readChar ( )
inline
Returns
read character

◆ readFloat()#

float ATokenizer::readFloat ( )
Returns
read float point number

◆ readString() [1/3]#

const std::string & ATokenizer::readString ( )
Returns
read string

◆ readString() [2/3]#

const std::string & ATokenizer::readString ( const ASet< char > & applicableChars)
Returns
read string

◆ readString() [3/3]#

const std::string & ATokenizer::readString ( size_t n)
Returns
read string

◆ readStringUntilUnescaped() [1/4]#

const std::string & ATokenizer::readStringUntilUnescaped ( char c)
Parameters
ccharacter to read until to
Returns
read string

◆ readStringUntilUnescaped() [2/4]#

const std::string & ATokenizer::readStringUntilUnescaped ( const ASet< char > & characters)
Parameters
characterscharacters to read until to
Returns
read string

◆ readStringUntilUnescaped() [3/4]#

void ATokenizer::readStringUntilUnescaped ( std::string & out,
char c )
Parameters
outread string
ccharacter to read until to

◆ readStringUntilUnescaped() [4/4]#

void ATokenizer::readStringUntilUnescaped ( std::string & out,
const ASet< char > & characters )
Parameters
outread string
characterscharacters to read until to

◆ readStringWhile()#

template<aui::predicate< char > Callable>
const std::string & ATokenizer::readStringWhile ( Callable pred)
inline
Returns
read string

◆ readVec2()#

glm::vec2 ATokenizer::readVec2 ( )
Returns
vec2

◆ skipUntil()#

void ATokenizer::skipUntil ( char c)
Parameters
ccharacter to read until to

◆ skipUntilUnescaped()#

void ATokenizer::skipUntilUnescaped ( char c)
Parameters
ccharacter to read until to