Seamly2D
Code documentation
qmuparserdef.h File Reference

This file contains standard definitions used by the parser. More...

#include <QMap>
#include <QString>
#include <locale>
#include "qmuparserfixes.h"
Include dependency graph for qmuparserdef.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 qmu
 Namespace for mathematical applications.
 

Macros

#define QMUP_VERSION   "2.5.0"
 
#define QMUP_VERSION_DATE   "20170101; GC"
 
#define QMUP_CHARS   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
 
#define QMUP_NOEXCEPT_EXPR(x)
 
#define __has_cpp_attribute(x)   0
 
#define QMUP_FALLTHROUGH
 
#define QMUP_STRING_TYPE   std::wstring
 If this macro is defined mathematical exceptions (div by zero) will be thrown as exceptions. More...
 

Typedefs

typedef std::wstring qmu::string_type
 The stringtype used by the parser. More...
 
typedef string_type::value_type qmu::char_type
 The character type used by the parser. More...
 
typedef std::basic_stringstream< char_type, std::char_traits< char_type >, std::allocator< char_type > > qmu::stringstream_type
 Typedef for easily using stringstream that respect the parser stringtype. More...
 
typedef std::map< QString, qreal * > qmu::varmap_type
 Type used for storing variables. More...
 
typedef std::map< QString, qreal > qmu::valmap_type
 Type used for storing constants. More...
 
typedef std::map< QString, int > qmu::strmap_type
 Type for assigning a string name to an index in the internal string table. More...
 
typedef qreal(* qmu::generic_fun_type) ()
 Callback type used for functions without arguments. More...
 
typedef qreal(* qmu::fun_type0) ()
 Callback type used for functions without arguments. More...
 
typedef qreal(* qmu::fun_type1) (qreal)
 Callback type used for functions with a single arguments. More...
 
typedef qreal(* qmu::fun_type2) (qreal, qreal)
 Callback type used for functions with two arguments. More...
 
typedef qreal(* qmu::fun_type3) (qreal, qreal, qreal)
 Callback type used for functions with three arguments. More...
 
typedef qreal(* qmu::fun_type4) (qreal, qreal, qreal, qreal)
 Callback type used for functions with four arguments. More...
 
typedef qreal(* qmu::fun_type5) (qreal, qreal, qreal, qreal, qreal)
 Callback type used for functions with five arguments. More...
 
typedef qreal(* qmu::fun_type6) (qreal, qreal, qreal, qreal, qreal, qreal)
 Callback type used for functions with five arguments. More...
 
typedef qreal(* qmu::fun_type7) (qreal, qreal, qreal, qreal, qreal, qreal, qreal)
 Callback type used for functions with five arguments. More...
 
typedef qreal(* qmu::fun_type8) (qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal)
 Callback type used for functions with five arguments. More...
 
typedef qreal(* qmu::fun_type9) (qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal)
 Callback type used for functions with five arguments. More...
 
typedef qreal(* qmu::fun_type10) (qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal)
 Callback type used for functions with five arguments. More...
 
typedef qreal(* qmu::bulkfun_type0) (int, int)
 Callback type used for functions without arguments. More...
 
typedef qreal(* qmu::bulkfun_type1) (int, int, qreal)
 Callback type used for functions with a single arguments. More...
 
typedef qreal(* qmu::bulkfun_type2) (int, int, qreal, qreal)
 Callback type used for functions with two arguments. More...
 
typedef qreal(* qmu::bulkfun_type3) (int, int, qreal, qreal, qreal)
 Callback type used for functions with three arguments. More...
 
typedef qreal(* qmu::bulkfun_type4) (int, int, qreal, qreal, qreal, qreal)
 Callback type used for functions with four arguments. More...
 
typedef qreal(* qmu::bulkfun_type5) (int, int, qreal, qreal, qreal, qreal, qreal)
 Callback type used for functions with five arguments. More...
 
typedef qreal(* qmu::bulkfun_type6) (int, int, qreal, qreal, qreal, qreal, qreal, qreal)
 Callback type used for functions with five arguments. More...
 
typedef qreal(* qmu::bulkfun_type7) (int, int, qreal, qreal, qreal, qreal, qreal, qreal, qreal)
 Callback type used for functions with five arguments. More...
 
typedef qreal(* qmu::bulkfun_type8) (int, int, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal)
 Callback type used for functions with five arguments. More...
 
typedef qreal(* qmu::bulkfun_type9) (int, int, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal)
 Callback type used for functions with five arguments. More...
 
typedef qreal(* qmu::bulkfun_type10) (int, int, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal, qreal)
 Callback type used for functions with five arguments. More...
 
typedef qreal(* qmu::multfun_type) (const qreal *, int)
 Callback type used for functions with a variable argument list. More...
 
typedef qreal(* qmu::strfun_type1) (const QString &)
 Callback type used for functions taking a string as an argument. More...
 
typedef qreal(* qmu::strfun_type2) (const QString &, qreal)
 Callback type used for functions taking a string and a value as arguments. More...
 
typedef qreal(* qmu::strfun_type3) (const QString &, qreal, qreal)
 Callback type used for functions taking a string and two values as arguments. More...
 
typedef int(* qmu::identfun_type) (const QString &sExpr, int *nPos, qreal *fVal, const QLocale &locale, const QChar &decimal, const QChar &thousand)
 Callback used for functions that identify values in a string. More...
 
typedef qreal *(* qmu::facfun_type) (const QString &, void *)
 Callback used for variable creation factory functions. More...
 

Enumerations

enum  qmu::ECmdCode {
  qmu::cmLE = 0 , qmu::cmGE = 1 , qmu::cmNEQ = 2 , qmu::cmEQ = 3 ,
  qmu::cmLT = 4 , qmu::cmGT = 5 , qmu::cmADD = 6 , qmu::cmSUB = 7 ,
  qmu::cmMUL = 8 , qmu::cmDIV = 9 , qmu::cmPOW = 10 , qmu::cmLAND = 11 ,
  qmu::cmLOR = 12 , qmu::cmASSIGN = 13 , qmu::cmBO = 14 , qmu::cmBC = 15 ,
  qmu::cmIF = 16 , qmu::cmELSE = 17 , qmu::cmENDIF = 18 , qmu::cmARG_SEP = 19 ,
  qmu::cmVAR = 20 , qmu::cmVAL = 21 , qmu::cmVARPOW2 , qmu::cmVARPOW3 ,
  qmu::cmVARPOW4 , qmu::cmVARMUL , qmu::cmPOW2 , qmu::cmFUNC ,
  qmu::cmFUNC_STR , qmu::cmFUNC_BULK , qmu::cmSTRING , qmu::cmOPRT_BIN ,
  qmu::cmOPRT_POSTFIX , qmu::cmOPRT_INFIX , qmu::cmEND , qmu::cmUNKNOWN
}
 Bytecode values. More...
 
enum  qmu::ETypeCode { qmu::tpSTR = 0 , qmu::tpDBL = 1 , qmu::tpVOID = 2 }
 Types internally used by the parser. More...
 
enum  qmu::EParserVersionInfo { qmu::pviBRIEF , qmu::pviFULL }
 
enum  qmu::EOprtAssociativity { qmu::oaLEFT = 0 , qmu::oaRIGHT = 1 , qmu::oaNONE = 2 }
 Parser operator precedence values. More...
 
enum  qmu::EOprtPrecedence {
  qmu::prLOR = 1 , qmu::prLAND = 2 , qmu::prLOGIC = 3 , qmu::prCMP = 4 ,
  qmu::prADD_SUB = 5 , qmu::prMUL_DIV = 6 , qmu::prPOW = 7 , qmu::prINFIX = 6 ,
  qmu::prPOSTFIX = 6
}
 Parser operator precedence values. More...
 

Detailed Description

This file contains standard definitions used by the parser.

Definition in file qmuparserdef.h.

Macro Definition Documentation

◆ __has_cpp_attribute

#define __has_cpp_attribute (   x)    0

Definition at line 56 of file qmuparserdef.h.

◆ QMUP_CHARS

#define QMUP_CHARS   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

Definition at line 38 of file qmuparserdef.h.

◆ QMUP_FALLTHROUGH

#define QMUP_FALLTHROUGH

Definition at line 74 of file qmuparserdef.h.

◆ QMUP_NOEXCEPT_EXPR

#define QMUP_NOEXCEPT_EXPR (   x)

Definition at line 52 of file qmuparserdef.h.

◆ QMUP_STRING_TYPE

#define QMUP_STRING_TYPE   std::wstring

If this macro is defined mathematical exceptions (div by zero) will be thrown as exceptions.

Activate this option in order to compile with OpenMP support.

OpenMP is used only in the bulk mode it may increase the performance a bit.

Definition of the basic parser string type.

Definition at line 87 of file qmuparserdef.h.

◆ QMUP_VERSION

#define QMUP_VERSION   "2.5.0"

Definition at line 35 of file qmuparserdef.h.

◆ QMUP_VERSION_DATE

#define QMUP_VERSION_DATE   "20170101; GC"

Definition at line 36 of file qmuparserdef.h.