Qt 4.8
Functions
qatomicmathematicians.cpp File Reference
#include <math.h>
#include <qnumeric.h>
#include "qabstractdatetime_p.h"
#include "qabstractduration_p.h"
#include "qabstractfloat_p.h"
#include "qdaytimeduration_p.h"
#include "qdecimal_p.h"
#include "qinteger_p.h"
#include "qpatternistlocale_p.h"
#include "qatomicmathematicians_p.h"

Go to the source code of this file.

Functions

static QString divZeroInvalid ()
 
static QString idivZeroInvalid ()
 
static QString modZeroInvalid ()
 

Function Documentation

◆ divZeroInvalid()

static QString divZeroInvalid ( )
inlinestatic

Definition at line 70 of file qatomicmathematicians.cpp.

Referenced by QPatternist::DecimalMathematician::calculate(), and QPatternist::IntegerMathematician::calculate().

71 {
72  return QtXmlPatterns::tr("Division (%1) by zero (%2) is undefined.")
73  .arg(formatKeyword("div"))
74  .arg(formatData("0"));
75 }
static QString formatKeyword(const VariableDeclaration::Ptr &var, const NamePool::Ptr &np)
Formats var appropriately for display.
static QString formatData(const QXmlNodeModelIndex node)
Definition: qitem_p.h:440

◆ idivZeroInvalid()

static QString idivZeroInvalid ( )
inlinestatic

Definition at line 63 of file qatomicmathematicians.cpp.

Referenced by QPatternist::DecimalMathematician::calculate(), and QPatternist::IntegerMathematician::calculate().

64 {
65  return QtXmlPatterns::tr("Integer division (%1) by zero (%2) is undefined.")
66  .arg(formatKeyword("idiv"))
67  .arg(formatData("0"));
68 }
static QString formatKeyword(const VariableDeclaration::Ptr &var, const NamePool::Ptr &np)
Formats var appropriately for display.
static QString formatData(const QXmlNodeModelIndex node)
Definition: qitem_p.h:440

◆ modZeroInvalid()

static QString modZeroInvalid ( )
inlinestatic

Definition at line 77 of file qatomicmathematicians.cpp.

Referenced by QPatternist::DecimalMathematician::calculate(), and QPatternist::IntegerMathematician::calculate().

78 {
79  return QtXmlPatterns::tr("Modulus division (%1) by zero (%2) is undefined.")
80  .arg(formatKeyword("mod"))
81  .arg(formatData("0"));
82 }
static QString formatKeyword(const VariableDeclaration::Ptr &var, const NamePool::Ptr &np)
Formats var appropriately for display.
static QString formatData(const QXmlNodeModelIndex node)
Definition: qitem_p.h:440