Qt 4.8
qxsdfacet_p.h
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 //
43 // W A R N I N G
44 // -------------
45 //
46 // This file is not part of the Qt API. It exists purely as an
47 // implementation detail. This header file may change from version to
48 // version without notice, or even be removed.
49 //
50 // We mean it.
51 
52 #ifndef Patternist_XsdFacet_H
53 #define Patternist_XsdFacet_H
54 
55 #include "qitem_p.h"
57 #include "qxsdannotated_p.h"
58 #include "qxsdassertion_p.h"
59 
60 #include <QtCore/QList>
61 
63 
65 
66 namespace QPatternist
67 {
94  {
95  public:
97 
101  enum Type
102  {
103  None = 0,
104  Length = 1 << 0,
105  MinimumLength = 1 << 1,
106  MaximumLength = 1 << 2,
107  Pattern = 1 << 3,
108  WhiteSpace = 1 << 4,
109  MaximumInclusive = 1 << 5,
110  MaximumExclusive = 1 << 6,
111  MinimumInclusive = 1 << 7,
112  MinimumExclusive = 1 << 8,
113  TotalDigits = 1 << 9,
114  FractionDigits = 1 << 10,
115  Enumeration = 1 << 11,
116  Assertion = 1 << 12,
117  };
119  typedef QHashIterator<XsdFacet::Type, XsdFacet::Ptr> HashIterator;
120 
124  XsdFacet();
125 
131  void setType(Type type);
132 
136  Type type() const;
137 
147  void setValue(const AtomicValue::Ptr &value);
148 
153  AtomicValue::Ptr value() const;
154 
162 
168 
176 
182 
188  void setFixed(bool fixed);
189 
193  bool fixed() const;
194 
198  static QString typeName(Type type);
199 
200  private:
205  bool m_fixed;
206  };
207 }
208 
210 
212 
213 #endif
void setMultiValue(const AtomicValue::List &value)
Definition: qxsdfacet.cpp:73
Match an assertion (Assertion Definition)
Definition: qxsdfacet_p.h:116
Represents a XSD facet object.
Definition: qxsdfacet_p.h:93
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
Match a minimum inclusive (Minimum Inclusive Definition)
Definition: qxsdfacet_p.h:111
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
XsdAssertion::List m_assertions
Definition: qxsdfacet_p.h:204
Due to strong interdependencies, this file contains the definitions for the classes Item...
The QExplicitlySharedDataPointer class represents a pointer to an explicitly shared object...
Definition: qshareddata.h:136
static QString typeName(Type type)
Definition: qxsdfacet.cpp:103
An invalid facet.
Definition: qxsdfacet_p.h:103
XsdAssertion::List assertions() const
Definition: qxsdfacet.cpp:88
The QString class provides a Unicode character string.
Definition: qstring.h:83
void setType(Type type)
Definition: qxsdfacet.cpp:53
QHash< XsdFacet::Type, XsdFacet::Ptr > Hash
Definition: qxsdfacet_p.h:118
Match a maximum exclusive (Maximum Exclusive Definition)
Definition: qxsdfacet_p.h:110
AtomicValue::List multiValue() const
Definition: qxsdfacet.cpp:78
AtomicValue::List m_multiValue
Definition: qxsdfacet_p.h:203
Match an enumeration (Enumeration Definition)
Definition: qxsdfacet_p.h:115
Base class for all XSD components with annotation content.
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
Match the minimum length (Minimum Length Definition)
Definition: qxsdfacet_p.h:105
The namespace for the internal API of QtXmlPatterns.
void setAssertions(const XsdAssertion::List &assertions)
Definition: qxsdfacet.cpp:83
AtomicValue::Ptr m_value
Definition: qxsdfacet_p.h:202
QExplicitlySharedDataPointer< XsdFacet > Ptr
Definition: qxsdfacet_p.h:96
Match a whitespace rule (White Space Definition)
Definition: qxsdfacet_p.h:108
Match a maximum inclusive (Maximum Inclusive Definition)
Definition: qxsdfacet_p.h:109
Match some double digits (Fraction Digits Definition)
Definition: qxsdfacet_p.h:114
Match a minimum exclusive (Minimum Exclusive Definition)
Definition: qxsdfacet_p.h:112
Match some integer digits (Total Digits Definition)
Definition: qxsdfacet_p.h:113
Match the exact length (Length Definition)
Definition: qxsdfacet_p.h:104
Match a regular expression (Pattern Definition)
Definition: qxsdfacet_p.h:107
void setFixed(bool fixed)
Definition: qxsdfacet.cpp:93
QHashIterator< XsdFacet::Type, XsdFacet::Ptr > HashIterator
Definition: qxsdfacet_p.h:119
AtomicValue::Ptr value() const
Definition: qxsdfacet.cpp:68
Type type() const
Definition: qxsdfacet.cpp:58
#define QT_END_HEADER
Definition: qglobal.h:137
Base class for all named components that can appear in a W3C XML Schema.
void setValue(const AtomicValue::Ptr &value)
Definition: qxsdfacet.cpp:63
Match the maximum length (Maximum Length Definition)
Definition: qxsdfacet_p.h:106
bool fixed() const
Definition: qxsdfacet.cpp:98