Seamly2D
Code documentation
qmudef.cpp File Reference
#include "qmudef.h"
#include <QLocale>
#include <QSet>
Include dependency graph for qmudef.cpp:

Go to the source code of this file.

Enumerations

enum  State {
  Init = 0 , Sign = 1 , Thousand = 2 , Mantissa = 3 ,
  Dot = 4 , Abscissa = 5 , ExpMark = 6 , ExpSign = 7 ,
  Exponent = 8 , Done = 9
}
 
enum  InputToken {
  InputSign = 1 , InputThousand = 2 , InputDigit = 3 , InputDot = 4 ,
  InputExp = 5
}
 

Functions

static QChar GetChar (const QString &formula, int &index)
 
static QChar EatWhiteSpace (const QString &formula, int &index)
 
static int CheckChar (QChar &c, const QLocale &locale, const QChar &decimal, const QChar &thousand)
 
int ReadVal (const QString &formula, qreal &val, const QLocale &locale, const QChar &decimal, const QChar &thousand)
 
QString NameRegExp ()
 

Variables

static const QChar QmuEOF = QChar(static_cast<ushort>(0xffff))
 

Enumeration Type Documentation

◆ InputToken

enum InputToken
Enumerator
InputSign 
InputThousand 
InputDigit 
InputDot 
InputExp 

Definition at line 41 of file qmudef.cpp.

◆ State

enum State
Enumerator
Init 
Sign 
Thousand 
Mantissa 
Dot 
Abscissa 
ExpMark 
ExpSign 
Exponent 
Done 

Definition at line 27 of file qmudef.cpp.

Function Documentation

◆ CheckChar()

static int CheckChar ( QChar &  c,
const QLocale &  locale,
const QChar &  decimal,
const QChar &  thousand 
)
static

Definition at line 77 of file qmudef.cpp.

References INIT_LOCALE_VARIABLES, InputDigit, InputDot, InputExp, InputSign, and InputThousand.

Referenced by ReadVal().

◆ EatWhiteSpace()

static QChar EatWhiteSpace ( const QString &  formula,
int &  index 
)
static

Definition at line 64 of file qmudef.cpp.

References GetChar(), and QmuEOF.

Referenced by ReadVal().

◆ GetChar()

static QChar GetChar ( const QString &  formula,
int &  index 
)
static

Definition at line 53 of file qmudef.cpp.

References QmuEOF.

Referenced by EatWhiteSpace(), and ReadVal().

◆ NameRegExp()

◆ ReadVal()

int ReadVal ( const QString &  formula,
qreal &  val,
const QLocale &  locale,
const QChar &  decimal,
const QChar &  thousand 
)

Variable Documentation

◆ QmuEOF

const QChar QmuEOF = QChar(static_cast<ushort>(0xffff))
static

Definition at line 50 of file qmudef.cpp.

Referenced by EatWhiteSpace(), and GetChar().