domparser.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef DOMPARSER_H
00022 #define DOMPARSER_H
00023
00024 #include <qguardedptr.h>
00025 #include <kjs/object.h>
00026 #include <kjs/interpreter.h>
00027 #include <misc/shared.h>
00028
00029 #include "kjs_dom.h"
00030
00031 namespace KJS {
00032
00033 class DOMParserConstructorImp : public ObjectImp {
00034 public:
00035 DOMParserConstructorImp(ExecState *, DOM::DocumentImpl *d);
00036 virtual bool implementsConstruct() const;
00037 virtual Object construct(ExecState *exec, const List &args);
00038 private:
00039 khtml::SharedPtr<DOM::DocumentImpl> doc;
00040 };
00041
00042 class DOMParser : public DOMObject {
00043 public:
00044 DOMParser(ExecState *, DOM::DocumentImpl *d);
00045 virtual bool toBoolean(ExecState *) const { return true; }
00046 virtual const ClassInfo* classInfo() const { return &info; }
00047 static const ClassInfo info;
00048 enum { ParseFromString };
00049
00050 private:
00051 QGuardedPtr<DOM::DocumentImpl> doc;
00052
00053 friend class DOMParserProtoFunc;
00054 };
00055
00056 }
00057
00058 #endif
|