File indexing completed on 2024-11-10 09:42:17

0001 /* This file is part of the KDE libraries
0002     Copyright (C) 2005, 2006 Ian Reinhart Geiser <geiseri@kde.org>
0003     Copyright (C) 2005, 2006 Matt Broadstone <mbroadst@gmail.com>
0004     Copyright (C) 2005, 2006 Richard J. Moore <rich@kde.org>
0005     Copyright (C) 2005, 2006 Erik L. Bunce <kde@bunce.us>
0006 
0007     This library is free software; you can redistribute it and/or
0008     modify it under the terms of the GNU Library General Public
0009     License as published by the Free Software Foundation; either
0010     version 2 of the License, or (at your option) any later version.
0011 
0012     This library is distributed in the hope that it will be useful,
0013     but WITHOUT ANY WARRANTY; without even the implied warranty of
0014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015     Library General Public License for more details.
0016 
0017     You should have received a copy of the GNU Library General Public License
0018     along with this library; see the file COPYING.LIB.  If not, write to
0019     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0020     Boston, MA 02110-1301, USA.
0021 */
0022 
0023 #ifndef DOM_H
0024 #define DOM_H
0025 
0026 class QDomNode;
0027 class QDomDocument;
0028 class QDomElement;
0029 class QDomAttr;
0030 class QDomDocumentType;
0031 class QDomNodeList;
0032 class QDomNamedNodeMap;
0033 class QDomText;
0034 
0035 #include "value_binding.h"
0036 #include "static_binding.h"
0037 
0038 namespace KJSEmbed
0039 {
0040 class DomNodeBinding : public ValueBinding
0041 {
0042 public:
0043     DomNodeBinding(KJS::ExecState *exec, const QDomNode &value);
0044 private:
0045     const KJS::ClassInfo *classInfo() const override
0046     {
0047         return &info;
0048     }
0049     static const KJS::ClassInfo info;
0050 };
0051 
0052 class DomDocumentBinding : public ValueBinding
0053 {
0054 public:
0055     DomDocumentBinding(KJS::ExecState *exec, const QDomDocument &value);
0056 private:
0057     const KJS::ClassInfo *classInfo() const override
0058     {
0059         return &info;
0060     }
0061     static const KJS::ClassInfo info;
0062 };
0063 
0064 class DomElementBinding : public ValueBinding
0065 {
0066 public:
0067     DomElementBinding(KJS::ExecState *exec, const QDomElement &value);
0068 private:
0069     const KJS::ClassInfo *classInfo() const override
0070     {
0071         return &info;
0072     }
0073     static const KJS::ClassInfo info;
0074 };
0075 
0076 class DomAttrBinding : public ValueBinding
0077 {
0078 public:
0079     DomAttrBinding(KJS::ExecState *exec, const QDomAttr &value);
0080 private:
0081     const KJS::ClassInfo *classInfo() const override
0082     {
0083         return &info;
0084     }
0085     static const KJS::ClassInfo info;
0086 };
0087 
0088 class DomDocumentTypeBinding : public ValueBinding
0089 {
0090 public:
0091     DomDocumentTypeBinding(KJS::ExecState *exec, const QDomDocumentType &value);
0092 private:
0093     const KJS::ClassInfo *classInfo() const override
0094     {
0095         return &info;
0096     }
0097     static const KJS::ClassInfo info;
0098 };
0099 
0100 class DomNodeListBinding : public ValueBinding
0101 {
0102 public:
0103     DomNodeListBinding(KJS::ExecState *exec, const QDomNodeList &value);
0104 private:
0105     const KJS::ClassInfo *classInfo() const override
0106     {
0107         return &info;
0108     }
0109     static const KJS::ClassInfo info;
0110 };
0111 
0112 class DomNamedNodeMapBinding : public ValueBinding
0113 {
0114 public:
0115     DomNamedNodeMapBinding(KJS::ExecState *exec, const QDomNamedNodeMap &value);
0116 private:
0117     const KJS::ClassInfo *classInfo() const override
0118     {
0119         return &info;
0120     }
0121     static const KJS::ClassInfo info;
0122 };
0123 
0124 class DomTextBinding : public ValueBinding
0125 {
0126 public:
0127     DomTextBinding(KJS::ExecState *exec, const QDomText &value);
0128 private:
0129     const KJS::ClassInfo *classInfo() const override
0130     {
0131         return &info;
0132     }
0133     static const KJS::ClassInfo info;
0134 };
0135 
0136 KJS_BINDING(DomNode)
0137 KJS_BINDING(DomDocument)   // Done
0138 KJS_BINDING(DomElement)   // Done
0139 KJS_BINDING(DomAttr)     // Done
0140 KJS_BINDING(DomDocumentType)   // Done
0141 KJS_BINDING(DomNodeList)   // Done
0142 KJS_BINDING(DomNamedNodeMap)
0143 KJS_BINDING(DomText)
0144 
0145 }
0146 #endif