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#ifndef JSTestOverloadedConstructors_h 22#define JSTestOverloadedConstructors_h 23 24#include "JSDOMBinding.h" 25#include "TestOverloadedConstructors.h" 26#include <runtime/JSGlobalObject.h> 27#include <runtime/JSObject.h> 28#include <runtime/ObjectPrototype.h> 29 30namespace WebCore { 31 32class JSTestOverloadedConstructors : public JSDOMWrapper { 33public: 34 typedef JSDOMWrapper Base; 35 static JSTestOverloadedConstructors* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestOverloadedConstructors> impl) 36 { 37 JSTestOverloadedConstructors* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructors>(globalObject->vm().heap)) JSTestOverloadedConstructors(structure, globalObject, impl); 38 ptr->finishCreation(globalObject->vm()); 39 return ptr; 40 } 41 42 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); 43 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); 44 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&); 45 static void destroy(JSC::JSCell*); 46 ~JSTestOverloadedConstructors(); 47 static const JSC::ClassInfo s_info; 48 49 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 50 { 51 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 52 } 53 54 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); 55 TestOverloadedConstructors* impl() const { return m_impl; } 56 void releaseImpl() { m_impl->deref(); m_impl = 0; } 57 58 void releaseImplIfNotNull() 59 { 60 if (m_impl) { 61 m_impl->deref(); 62 m_impl = 0; 63 } 64 } 65 66private: 67 TestOverloadedConstructors* m_impl; 68protected: 69 JSTestOverloadedConstructors(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestOverloadedConstructors>); 70 void finishCreation(JSC::VM&); 71 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | Base::StructureFlags; 72}; 73 74class JSTestOverloadedConstructorsOwner : public JSC::WeakHandleOwner { 75public: 76 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&); 77 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context); 78}; 79 80inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, TestOverloadedConstructors*) 81{ 82 DEFINE_STATIC_LOCAL(JSTestOverloadedConstructorsOwner, jsTestOverloadedConstructorsOwner, ()); 83 return &jsTestOverloadedConstructorsOwner; 84} 85 86inline void* wrapperContext(DOMWrapperWorld* world, TestOverloadedConstructors*) 87{ 88 return world; 89} 90 91JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestOverloadedConstructors*); 92TestOverloadedConstructors* toTestOverloadedConstructors(JSC::JSValue); 93 94class JSTestOverloadedConstructorsPrototype : public JSC::JSNonFinalObject { 95public: 96 typedef JSC::JSNonFinalObject Base; 97 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); 98 static JSTestOverloadedConstructorsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) 99 { 100 JSTestOverloadedConstructorsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructorsPrototype>(vm.heap)) JSTestOverloadedConstructorsPrototype(vm, globalObject, structure); 101 ptr->finishCreation(vm); 102 return ptr; 103 } 104 105 static const JSC::ClassInfo s_info; 106 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 107 { 108 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 109 } 110 111private: 112 JSTestOverloadedConstructorsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { } 113protected: 114 static const unsigned StructureFlags = Base::StructureFlags; 115}; 116 117class JSTestOverloadedConstructorsConstructor : public DOMConstructorObject { 118private: 119 JSTestOverloadedConstructorsConstructor(JSC::Structure*, JSDOMGlobalObject*); 120 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*); 121 122public: 123 typedef DOMConstructorObject Base; 124 static JSTestOverloadedConstructorsConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject) 125 { 126 JSTestOverloadedConstructorsConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestOverloadedConstructorsConstructor>(*exec->heap())) JSTestOverloadedConstructorsConstructor(structure, globalObject); 127 ptr->finishCreation(exec, globalObject); 128 return ptr; 129 } 130 131 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); 132 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&); 133 static const JSC::ClassInfo s_info; 134 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 135 { 136 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 137 } 138protected: 139 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; 140 static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors(JSC::ExecState*); 141 static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors1(JSC::ExecState*); 142 static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors2(JSC::ExecState*); 143 static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors3(JSC::ExecState*); 144 static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors4(JSC::ExecState*); 145 static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&); 146}; 147 148// Attributes 149 150JSC::JSValue jsTestOverloadedConstructorsConstructor(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 151 152} // namespace WebCore 153 154#endif 155