Qt 4.8
qcommonvalues.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtXmlPatterns module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #include <limits>
43 
44 #include "qabstractfloat_p.h"
45 #include "qanyuri_p.h"
46 #include "qboolean_p.h"
47 #include "qdecimal_p.h"
48 #include "qinteger_p.h"
49 #include "qatomicstring_p.h"
50 #include "quntypedatomic_p.h"
51 
52 #include "qcommonvalues_p.h"
53 
55 
56 using namespace QPatternist;
57 
58 // STATIC DATA
60  (new AtomicString(QLatin1String("")));
62  (new AtomicString(QLatin1String("true")));
64  (new AtomicString(QLatin1String("false")));
65 
67  (new UntypedAtomic(QLatin1String("true")));
69  (new UntypedAtomic(QLatin1String("false")));
70 
72  (new Boolean(true));
74 
76  (Double::fromValue(std::numeric_limits<xsDouble>::quiet_NaN()));
77 
79  (Float::fromValue(std::numeric_limits<xsFloat>::quiet_NaN()));
80 
82  (Integer::fromValue(0));
83 
86 
88  (Double::fromValue(1));
90  (Float::fromValue(1));
92  (Decimal::fromValue(1));
94  (Integer::fromValue(1));
96  (Integer::fromValue(-1));
97 
99  (Double::fromValue(0));
101  (Float::fromValue(0));
103  (Decimal::fromValue(0));
104 
106  (new Item::EmptyIterator());
107 
109  (Double::fromValue(-std::numeric_limits<xsDouble>::infinity()));
111  (Double::fromValue(std::numeric_limits<xsDouble>::infinity()));
113  (Float::fromValue(-std::numeric_limits<xsFloat>::infinity()));
115  (Float::fromValue(std::numeric_limits<xsFloat>::infinity()));
116 
120  (YearMonthDuration::fromComponents(true, 0, 0));
121 
122 
static const AtomicValue::Ptr FloatOne
static const DayTimeDuration::Ptr YearMonthDurationZero
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
static const AtomicValue::Ptr BooleanTrue
static const AtomicValue::Ptr DoubleZero
static const AtomicValue::Ptr EmptyAnyURI
static const Item IntegerOne
Implements the value instance of the xs:string type.
static const AtomicValue::Ptr DoubleNaN
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static const AtomicValue::Ptr FloatNaN
static const AtomicValue::Ptr DecimalOne
static const Item IntegerZero
static const EmptyIterator< Item >::Ptr emptyIterator
static Item fromValue(const xsInteger num)
Definition: qinteger.cpp:52
static const AtomicValue::Ptr NegativeInfFloat
QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< T > > Ptr
A smart pointer wrapping an instance of a QAbstractXmlForwardIterator subclass.
static DayTimeDuration::Ptr fromSeconds(const SecondCountProperty secs, const MSecondProperty msecs=0)
static const AtomicValue::Ptr FalseString
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
The namespace for the internal API of QtXmlPatterns.
static const AtomicValue::Ptr UntypedAtomicTrue
static Decimal::Ptr fromValue(const xsDecimal num)
Definition: qdecimal.cpp:59
static const Item IntegerOneNegative
static const AtomicValue::Ptr InfFloat
static const AtomicValue::Ptr FloatZero
static YearMonthDuration::Ptr fromComponents(const bool isPositive, const YearProperty years, const MonthProperty months)
Represents an item in the XPath 2.0 Data Model.
Definition: qitem_p.h:182
static const DayTimeDuration::Ptr DayTimeDurationZero
static const AtomicValue::Ptr EmptyString
static const AtomicValue::Ptr TrueString
static Numeric::Ptr fromValue(const xsDouble num)
static const AtomicValue::Ptr InfDouble
static const AtomicValue::Ptr DoubleOne
Implements the value instance of the xs:untypedAtomic type.
static const AtomicValue::Ptr DecimalZero
static const AtomicValue::Ptr BooleanFalse
QPatternist::EmptyIterator< Item > EmptyIterator
Definition: qitem_p.h:203
static const AtomicValue::Ptr UntypedAtomicFalse
static const AtomicValue::Ptr NegativeInfDouble
static AnyURI::Ptr fromValue(const QString &value)
Definition: qanyuri.cpp:56