kjsembed
dom.h
Go to the documentation of this file.00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2005, 2006 Ian Reinhart Geiser <geiseri@kde.org> 00003 Copyright (C) 2005, 2006 Matt Broadstone <mbroadst@gmail.com> 00004 Copyright (C) 2005, 2006 Richard J. Moore <rich@kde.org> 00005 Copyright (C) 2005, 2006 Erik L. Bunce <kde@bunce.us> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00020 Boston, MA 02110-1301, USA. 00021 */ 00022 00023 00024 #ifndef DOM_H 00025 #define DOM_H 00026 00027 class QDomNode; 00028 class QDomDocument; 00029 class QDomElement; 00030 class QDomAttr; 00031 class QDomDocumentType; 00032 class QDomNodeList; 00033 class QDomNamedNodeMap; 00034 class QDomText; 00035 00036 #include "value_binding.h" 00037 #include "static_binding.h" 00038 00039 namespace KJSEmbed 00040 { 00041 class DomNodeBinding : public ValueBinding 00042 { 00043 public: 00044 DomNodeBinding( KJS::ExecState *exec, const QDomNode &value ); 00045 private: 00046 virtual const KJS::ClassInfo* classInfo() const { return &info; } 00047 static const KJS::ClassInfo info; 00048 }; 00049 00050 class DomDocumentBinding : public ValueBinding 00051 { 00052 public: 00053 DomDocumentBinding( KJS::ExecState *exec, const QDomDocument &value ); 00054 private: 00055 virtual const KJS::ClassInfo* classInfo() const { return &info; } 00056 static const KJS::ClassInfo info; 00057 }; 00058 00059 class DomElementBinding : public ValueBinding 00060 { 00061 public: 00062 DomElementBinding( KJS::ExecState *exec, const QDomElement &value ); 00063 private: 00064 virtual const KJS::ClassInfo* classInfo() const { return &info; } 00065 static const KJS::ClassInfo info; 00066 }; 00067 00068 class DomAttrBinding : public ValueBinding 00069 { 00070 public: 00071 DomAttrBinding( KJS::ExecState *exec, const QDomAttr &value ); 00072 private: 00073 virtual const KJS::ClassInfo* classInfo() const { return &info; } 00074 static const KJS::ClassInfo info; 00075 }; 00076 00077 class DomDocumentTypeBinding : public ValueBinding 00078 { 00079 public: 00080 DomDocumentTypeBinding( KJS::ExecState *exec, const QDomDocumentType &value ); 00081 private: 00082 virtual const KJS::ClassInfo* classInfo() const { return &info; } 00083 static const KJS::ClassInfo info; 00084 }; 00085 00086 class DomNodeListBinding : public ValueBinding 00087 { 00088 public: 00089 DomNodeListBinding( KJS::ExecState *exec, const QDomNodeList &value ); 00090 private: 00091 virtual const KJS::ClassInfo* classInfo() const { return &info; } 00092 static const KJS::ClassInfo info; 00093 }; 00094 00095 class DomNamedNodeMapBinding : public ValueBinding 00096 { 00097 public: 00098 DomNamedNodeMapBinding( KJS::ExecState *exec, const QDomNamedNodeMap &value ); 00099 private: 00100 virtual const KJS::ClassInfo* classInfo() const { return &info; } 00101 static const KJS::ClassInfo info; 00102 }; 00103 00104 class DomTextBinding : public ValueBinding 00105 { 00106 public: 00107 DomTextBinding( KJS::ExecState *exec, const QDomText &value ); 00108 private: 00109 virtual const KJS::ClassInfo* classInfo() const { return &info; } 00110 static const KJS::ClassInfo info; 00111 }; 00112 00113 KJS_BINDING( DomNode ) 00114 KJS_BINDING( DomDocument ) // Done 00115 KJS_BINDING( DomElement ) // Done 00116 KJS_BINDING( DomAttr ) // Done 00117 KJS_BINDING( DomDocumentType ) // Done 00118 KJS_BINDING( DomNodeList ) // Done 00119 KJS_BINDING( DomNamedNodeMap ) 00120 KJS_BINDING( DomText ) 00121 00122 } 00123 #endif 00124 //kate: indent-spaces on; indent-width 4; replace-tabs on; indent-mode cstyle;