Mercurial > projects > qtd
comparison generator/typesystem_xml-java.java @ 35:5917a613d118
wrapping of QtXml
author | eldar |
---|---|
date | Sat, 16 May 2009 20:47:44 +0000 |
parents | e78566595089 |
children |
comparison
equal
deleted
inserted
replaced
34:17cc45b32686 | 35:5917a613d118 |
---|---|
1 /**************************************************************************** | 1 /**************************************************************************** |
2 ** | 2 ** |
3 ** Copyright (C) 1992-2008 Nokia. All rights reserved. | 3 ** Copyright (C) 1992-2009 Nokia. All rights reserved. |
4 ** | 4 ** |
5 ** This file is part of Qt Jambi. | 5 ** This file is part of Qt Jambi. |
6 ** | 6 ** |
7 ** * Commercial Usage | 7 ** Commercial Usage |
8 * Licensees holding valid Qt Commercial licenses may use this file in | 8 Licensees holding valid Qt Commercial licenses may use this file in |
9 * accordance with the Qt Commercial License Agreement provided with the | 9 accordance with the Qt Commercial License Agreement provided with the |
10 * Software or, alternatively, in accordance with the terms contained in | 10 Software or, alternatively, in accordance with the terms contained in |
11 * a written agreement between you and Nokia. | 11 a written agreement between you and Nokia. |
12 * | 12 |
13 * | 13 GNU Lesser General Public License Usage |
14 * GNU General Public License Usage | 14 Alternatively, this file may be used under the terms of the GNU Lesser |
15 * Alternatively, this file may be used under the terms of the GNU | 15 General Public License version 2.1 as published by the Free Software |
16 * General Public License versions 2.0 or 3.0 as published by the Free | 16 Foundation and appearing in the file LICENSE.LGPL included in the |
17 * Software Foundation and appearing in the file LICENSE.GPL included in | 17 packaging of this file. Please review the following information to |
18 * the packaging of this file. Please review the following information | 18 ensure the GNU Lesser General Public License version 2.1 requirements |
19 * to ensure GNU General Public Licensing requirements will be met: | 19 will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
20 * http://www.fsf.org/licensing/licenses/info/GPLv2.html and | 20 |
21 * http://www.gnu.org/copyleft/gpl.html. In addition, as a special | 21 In addition, as a special exception, Nokia gives you certain |
22 * exception, Nokia gives you certain additional rights. These rights | 22 additional rights. These rights are described in the Nokia Qt LGPL |
23 * are described in the Nokia Qt GPL Exception version 1.2, included in | 23 Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this |
24 * the file GPL_EXCEPTION.txt in this package. | 24 package. |
25 * | 25 |
26 * Qt for Windows(R) Licensees | 26 GNU General Public License Usage |
27 * As a special exception, Nokia, as the sole copyright holder for Qt | 27 Alternatively, this file may be used under the terms of the GNU |
28 * Designer, grants users of the Qt/Eclipse Integration plug-in the | 28 General Public License version 3.0 as published by the Free Software |
29 * right for the Qt/Eclipse Integration to link to functionality | 29 Foundation and appearing in the file LICENSE.GPL included in the |
30 * provided by Qt Designer and its related libraries. | 30 packaging of this file. Please review the following information to |
31 * | 31 ensure the GNU General Public License version 3.0 requirements will be |
32 * | 32 met: http://www.gnu.org/copyleft/gpl.html. |
33 * If you are unsure which license is appropriate for your use, please | 33 |
34 * contact the sales department at qt-sales@nokia.com. | 34 If you are unsure which license is appropriate for your use, please |
35 contact the sales department at qt-sales@nokia.com. | |
35 | 36 |
36 ** | 37 ** |
37 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 38 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
38 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 39 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
39 ** | 40 ** |
40 ****************************************************************************/ | 41 ****************************************************************************/ |
41 | 42 |
42 package generator; | 43 package generator; |
43 | 44 |
44 import qt.*; | 45 import com.trolltech.qt.*; |
45 import qt.xml.*; | 46 import com.trolltech.qt.xml.*; |
46 | 47 |
47 class QDomDocument___ extends QDomDocument { | 48 class QDomDocument___ extends QDomDocument { |
48 | 49 |
49 public class Result { | 50 public class Result { |
50 private Result(boolean success, QNativePointer errorMessage, QNativePointer errorLine, QNativePointer errorColumn) { | 51 private Result(boolean success, QNativePointer errorMessage, QNativePointer errorLine, QNativePointer errorColumn) { |
57 public boolean success; | 58 public boolean success; |
58 public String errorMessage; | 59 public String errorMessage; |
59 public int errorLine; | 60 public int errorLine; |
60 public int errorColumn; | 61 public int errorColumn; |
61 | 62 |
63 } | |
64 | |
65 public final Result setContent(QXmlInputSource source, boolean namespaceProcessing) | |
66 { | |
67 QNativePointer errorStr = new QNativePointer(QNativePointer.Type.String); | |
68 QNativePointer errorLine = new QNativePointer(QNativePointer.Type.Int); | |
69 QNativePointer errorColumn = new QNativePointer(QNativePointer.Type.Int); | |
70 | |
71 boolean success = setContent(source, namespaceProcessing, errorStr, errorLine, errorColumn); | |
72 | |
73 return new Result(success, errorStr, errorLine, errorColumn); | |
62 } | 74 } |
63 | 75 |
64 }// class | 76 }// class |
65 | 77 |
66 class QXmlNamespaceSupport___ extends QXmlNamespaceSupport { | 78 class QXmlNamespaceSupport___ extends QXmlNamespaceSupport { |
103 | 115 |
104 }// class | 116 }// class |
105 | 117 |
106 class QXmlStreamWriter___ extends QXmlStreamWriter { | 118 class QXmlStreamWriter___ extends QXmlStreamWriter { |
107 | 119 |
108 public QXmlStreamWriter(qt.core.QByteArray array) { | 120 public QXmlStreamWriter(com.trolltech.qt.core.QByteArray array) { |
109 this(array.nativePointer()); | 121 this(array.nativePointer()); |
110 __rcDevice = array; | 122 __rcDevice = array; |
111 } | 123 } |
112 | 124 |
113 public final void setCodec(String codecName) { | 125 public final void setCodec(String codecName) { |
132 } | 144 } |
133 | 145 |
134 } | 146 } |
135 | 147 |
136 }// class | 148 }// class |
149 | |
150 |