WebCore/generated/JSNotation.cpp
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     1 /*
       
     2     This file is part of the WebKit open source project.
       
     3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
       
     4 
       
     5     This library is free software; you can redistribute it and/or
       
     6     modify it under the terms of the GNU Library 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     Library General Public License for more details.
       
    14 
       
    15     You should have received a copy of the GNU Library General Public License
       
    16     along with this library; see the file COPYING.LIB.  If not, write to
       
    17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
       
    18     Boston, MA 02110-1301, USA.
       
    19 */
       
    20 
       
    21 #include "config.h"
       
    22 #include "JSNotation.h"
       
    23 
       
    24 #include "KURL.h"
       
    25 #include "Notation.h"
       
    26 #include <wtf/GetPtr.h>
       
    27 
       
    28 using namespace JSC;
       
    29 
       
    30 namespace WebCore {
       
    31 
       
    32 ASSERT_CLASS_FITS_IN_CELL(JSNotation);
       
    33 
       
    34 /* Hash table */
       
    35 #if ENABLE(JIT)
       
    36 #define THUNK_GENERATOR(generator) , generator
       
    37 #else
       
    38 #define THUNK_GENERATOR(generator)
       
    39 #endif
       
    40 
       
    41 static const HashTableValue JSNotationTableValues[4] =
       
    42 {
       
    43     { "publicId", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsNotationPublicId), (intptr_t)0 THUNK_GENERATOR(0) },
       
    44     { "systemId", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsNotationSystemId), (intptr_t)0 THUNK_GENERATOR(0) },
       
    45     { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsNotationConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
       
    46     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    47 };
       
    48 
       
    49 #undef THUNK_GENERATOR
       
    50 static JSC_CONST_HASHTABLE HashTable JSNotationTable = { 9, 7, JSNotationTableValues, 0 };
       
    51 /* Hash table for constructor */
       
    52 #if ENABLE(JIT)
       
    53 #define THUNK_GENERATOR(generator) , generator
       
    54 #else
       
    55 #define THUNK_GENERATOR(generator)
       
    56 #endif
       
    57 
       
    58 static const HashTableValue JSNotationConstructorTableValues[1] =
       
    59 {
       
    60     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
    61 };
       
    62 
       
    63 #undef THUNK_GENERATOR
       
    64 static JSC_CONST_HASHTABLE HashTable JSNotationConstructorTable = { 1, 0, JSNotationConstructorTableValues, 0 };
       
    65 class JSNotationConstructor : public DOMConstructorObject {
       
    66 public:
       
    67     JSNotationConstructor(JSC::ExecState*, JSDOMGlobalObject*);
       
    68 
       
    69     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
       
    70     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
       
    71     virtual const JSC::ClassInfo* classInfo() const { return &s_info; }
       
    72     static const JSC::ClassInfo s_info;
       
    73     static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype)
       
    74     {
       
    75         return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount);
       
    76     }
       
    77 protected:
       
    78     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
       
    79 };
       
    80 
       
    81 const ClassInfo JSNotationConstructor::s_info = { "NotationConstructor", 0, &JSNotationConstructorTable, 0 };
       
    82 
       
    83 JSNotationConstructor::JSNotationConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
       
    84     : DOMConstructorObject(JSNotationConstructor::createStructure(globalObject->objectPrototype()), globalObject)
       
    85 {
       
    86     putDirect(exec->propertyNames().prototype, JSNotationPrototype::self(exec, globalObject), DontDelete | ReadOnly);
       
    87 }
       
    88 
       
    89 bool JSNotationConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
    90 {
       
    91     return getStaticValueSlot<JSNotationConstructor, DOMObject>(exec, &JSNotationConstructorTable, this, propertyName, slot);
       
    92 }
       
    93 
       
    94 bool JSNotationConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
    95 {
       
    96     return getStaticValueDescriptor<JSNotationConstructor, DOMObject>(exec, &JSNotationConstructorTable, this, propertyName, descriptor);
       
    97 }
       
    98 
       
    99 /* Hash table for prototype */
       
   100 #if ENABLE(JIT)
       
   101 #define THUNK_GENERATOR(generator) , generator
       
   102 #else
       
   103 #define THUNK_GENERATOR(generator)
       
   104 #endif
       
   105 
       
   106 static const HashTableValue JSNotationPrototypeTableValues[1] =
       
   107 {
       
   108     { 0, 0, 0, 0 THUNK_GENERATOR(0) }
       
   109 };
       
   110 
       
   111 #undef THUNK_GENERATOR
       
   112 static JSC_CONST_HASHTABLE HashTable JSNotationPrototypeTable = { 1, 0, JSNotationPrototypeTableValues, 0 };
       
   113 const ClassInfo JSNotationPrototype::s_info = { "NotationPrototype", 0, &JSNotationPrototypeTable, 0 };
       
   114 
       
   115 JSObject* JSNotationPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
       
   116 {
       
   117     return getDOMPrototype<JSNotation>(exec, globalObject);
       
   118 }
       
   119 
       
   120 const ClassInfo JSNotation::s_info = { "Notation", &JSNode::s_info, &JSNotationTable, 0 };
       
   121 
       
   122 JSNotation::JSNotation(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<Notation> impl)
       
   123     : JSNode(structure, globalObject, impl)
       
   124 {
       
   125 }
       
   126 
       
   127 JSObject* JSNotation::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
       
   128 {
       
   129     return new (exec) JSNotationPrototype(globalObject, JSNotationPrototype::createStructure(JSNodePrototype::self(exec, globalObject)));
       
   130 }
       
   131 
       
   132 bool JSNotation::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
       
   133 {
       
   134     return getStaticValueSlot<JSNotation, Base>(exec, &JSNotationTable, this, propertyName, slot);
       
   135 }
       
   136 
       
   137 bool JSNotation::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
       
   138 {
       
   139     return getStaticValueDescriptor<JSNotation, Base>(exec, &JSNotationTable, this, propertyName, descriptor);
       
   140 }
       
   141 
       
   142 JSValue jsNotationPublicId(ExecState* exec, JSValue slotBase, const Identifier&)
       
   143 {
       
   144     JSNotation* castedThis = static_cast<JSNotation*>(asObject(slotBase));
       
   145     UNUSED_PARAM(exec);
       
   146     Notation* imp = static_cast<Notation*>(castedThis->impl());
       
   147     JSValue result = jsStringOrNull(exec, imp->publicId());
       
   148     return result;
       
   149 }
       
   150 
       
   151 JSValue jsNotationSystemId(ExecState* exec, JSValue slotBase, const Identifier&)
       
   152 {
       
   153     JSNotation* castedThis = static_cast<JSNotation*>(asObject(slotBase));
       
   154     UNUSED_PARAM(exec);
       
   155     Notation* imp = static_cast<Notation*>(castedThis->impl());
       
   156     JSValue result = jsStringOrNull(exec, imp->systemId());
       
   157     return result;
       
   158 }
       
   159 
       
   160 JSValue jsNotationConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
       
   161 {
       
   162     JSNotation* domObject = static_cast<JSNotation*>(asObject(slotBase));
       
   163     return JSNotation::getConstructor(exec, domObject->globalObject());
       
   164 }
       
   165 JSValue JSNotation::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
       
   166 {
       
   167     return getDOMConstructor<JSNotationConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
       
   168 }
       
   169 
       
   170 
       
   171 }