KHtml

domparser.h
1 /*
2  * This file is part of the KDE libraries
3  * Copyright (C) 2005 Anders Carlsson ([email protected])
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef DOMPARSER_H
21 #define DOMPARSER_H
22 
23 #include <khtml_export.h>
24 #include <kjs/object.h>
25 #include <kjs/interpreter.h>
26 #include <misc/shared.h>
27 #include <QPointer>
28 
29 #include "kjs_dom.h"
30 
31 namespace KJS
32 {
33 
34 class DOMParserConstructorImp : public JSObject
35 {
36 public:
37  DOMParserConstructorImp(ExecState *, DOM::DocumentImpl *d);
38  bool implementsConstruct() const override;
39  using KJS::JSObject::construct;
40  JSObject *construct(ExecState *exec, const List &args) override;
41 private:
42  SharedPtr<DOM::DocumentImpl> doc;
43 };
44 
45 class DOMParser : public DOMObject
46 {
47 public:
48  DOMParser(ExecState *, DOM::DocumentImpl *d);
49  bool toBoolean(ExecState *) const override
50  {
51  return true;
52  }
53  const ClassInfo *classInfo() const override
54  {
55  return &info;
56  }
57  static const ClassInfo info;
58  enum { ParseFromString };
59 
60 private:
62 
63  friend class DOMParserProtoFunc;
64 };
65 
66 } // namespace
67 
68 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 22:47:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.