/src/3rdparty/webkit/Source/WebCore/generated/JSSpeechInputResult.cpp

https://bitbucket.org/ultra_iter/qt-vtl · C++ · 191 lines · 133 code · 36 blank · 22 comment · 0 complexity · c0a6409faae9c883d2905844c8edc97a MD5 · raw file

  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. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License as published by the Free Software Foundation; either
  7. version 2 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public License
  13. along with this library; see the file COPYING.LIB. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  15. Boston, MA 02110-1301, USA.
  16. */
  17. #include "config.h"
  18. #if ENABLE(INPUT_SPEECH)
  19. #include "JSSpeechInputResult.h"
  20. #include "KURL.h"
  21. #include "SpeechInputResult.h"
  22. #include <runtime/JSString.h>
  23. #include <wtf/GetPtr.h>
  24. using namespace JSC;
  25. namespace WebCore {
  26. ASSERT_CLASS_FITS_IN_CELL(JSSpeechInputResult);
  27. /* Hash table */
  28. #if ENABLE(JIT)
  29. #define THUNK_GENERATOR(generator) , generator
  30. #else
  31. #define THUNK_GENERATOR(generator)
  32. #endif
  33. static const HashTableValue JSSpeechInputResultTableValues[4] =
  34. {
  35. { "utterance", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSpeechInputResultUtterance), (intptr_t)0 THUNK_GENERATOR(0) },
  36. { "confidence", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSpeechInputResultConfidence), (intptr_t)0 THUNK_GENERATOR(0) },
  37. { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSpeechInputResultConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
  38. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  39. };
  40. #undef THUNK_GENERATOR
  41. static JSC_CONST_HASHTABLE HashTable JSSpeechInputResultTable = { 8, 7, JSSpeechInputResultTableValues, 0 };
  42. /* Hash table for constructor */
  43. #if ENABLE(JIT)
  44. #define THUNK_GENERATOR(generator) , generator
  45. #else
  46. #define THUNK_GENERATOR(generator)
  47. #endif
  48. static const HashTableValue JSSpeechInputResultConstructorTableValues[1] =
  49. {
  50. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  51. };
  52. #undef THUNK_GENERATOR
  53. static JSC_CONST_HASHTABLE HashTable JSSpeechInputResultConstructorTable = { 1, 0, JSSpeechInputResultConstructorTableValues, 0 };
  54. class JSSpeechInputResultConstructor : public DOMConstructorObject {
  55. public:
  56. JSSpeechInputResultConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
  57. virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
  58. virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
  59. static const JSC::ClassInfo s_info;
  60. static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
  61. {
  62. return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
  63. }
  64. protected:
  65. static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
  66. };
  67. const ClassInfo JSSpeechInputResultConstructor::s_info = { "SpeechInputResultConstructor", &DOMConstructorObject::s_info, &JSSpeechInputResultConstructorTable, 0 };
  68. JSSpeechInputResultConstructor::JSSpeechInputResultConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
  69. : DOMConstructorObject(structure, globalObject)
  70. {
  71. ASSERT(inherits(&s_info));
  72. putDirect(exec->globalData(), exec->propertyNames().prototype, JSSpeechInputResultPrototype::self(exec, globalObject), DontDelete | ReadOnly);
  73. }
  74. bool JSSpeechInputResultConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
  75. {
  76. return getStaticValueSlot<JSSpeechInputResultConstructor, JSDOMWrapper>(exec, &JSSpeechInputResultConstructorTable, this, propertyName, slot);
  77. }
  78. bool JSSpeechInputResultConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
  79. {
  80. return getStaticValueDescriptor<JSSpeechInputResultConstructor, JSDOMWrapper>(exec, &JSSpeechInputResultConstructorTable, this, propertyName, descriptor);
  81. }
  82. /* Hash table for prototype */
  83. #if ENABLE(JIT)
  84. #define THUNK_GENERATOR(generator) , generator
  85. #else
  86. #define THUNK_GENERATOR(generator)
  87. #endif
  88. static const HashTableValue JSSpeechInputResultPrototypeTableValues[1] =
  89. {
  90. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  91. };
  92. #undef THUNK_GENERATOR
  93. static JSC_CONST_HASHTABLE HashTable JSSpeechInputResultPrototypeTable = { 1, 0, JSSpeechInputResultPrototypeTableValues, 0 };
  94. const ClassInfo JSSpeechInputResultPrototype::s_info = { "SpeechInputResultPrototype", &JSC::JSObjectWithGlobalObject::s_info, &JSSpeechInputResultPrototypeTable, 0 };
  95. JSObject* JSSpeechInputResultPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
  96. {
  97. return getDOMPrototype<JSSpeechInputResult>(exec, globalObject);
  98. }
  99. const ClassInfo JSSpeechInputResult::s_info = { "SpeechInputResult", &JSDOMWrapper::s_info, &JSSpeechInputResultTable, 0 };
  100. JSSpeechInputResult::JSSpeechInputResult(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SpeechInputResult> impl)
  101. : JSDOMWrapper(structure, globalObject)
  102. , m_impl(impl)
  103. {
  104. ASSERT(inherits(&s_info));
  105. }
  106. JSObject* JSSpeechInputResult::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
  107. {
  108. return new (exec) JSSpeechInputResultPrototype(exec->globalData(), globalObject, JSSpeechInputResultPrototype::createStructure(globalObject->globalData(), globalObject->objectPrototype()));
  109. }
  110. bool JSSpeechInputResult::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
  111. {
  112. return getStaticValueSlot<JSSpeechInputResult, Base>(exec, &JSSpeechInputResultTable, this, propertyName, slot);
  113. }
  114. bool JSSpeechInputResult::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
  115. {
  116. return getStaticValueDescriptor<JSSpeechInputResult, Base>(exec, &JSSpeechInputResultTable, this, propertyName, descriptor);
  117. }
  118. JSValue jsSpeechInputResultUtterance(ExecState* exec, JSValue slotBase, const Identifier&)
  119. {
  120. JSSpeechInputResult* castedThis = static_cast<JSSpeechInputResult*>(asObject(slotBase));
  121. UNUSED_PARAM(exec);
  122. SpeechInputResult* imp = static_cast<SpeechInputResult*>(castedThis->impl());
  123. JSValue result = jsString(exec, imp->utterance());
  124. return result;
  125. }
  126. JSValue jsSpeechInputResultConfidence(ExecState* exec, JSValue slotBase, const Identifier&)
  127. {
  128. JSSpeechInputResult* castedThis = static_cast<JSSpeechInputResult*>(asObject(slotBase));
  129. UNUSED_PARAM(exec);
  130. SpeechInputResult* imp = static_cast<SpeechInputResult*>(castedThis->impl());
  131. JSValue result = jsNumber(imp->confidence());
  132. return result;
  133. }
  134. JSValue jsSpeechInputResultConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
  135. {
  136. JSSpeechInputResult* domObject = static_cast<JSSpeechInputResult*>(asObject(slotBase));
  137. return JSSpeechInputResult::getConstructor(exec, domObject->globalObject());
  138. }
  139. JSValue JSSpeechInputResult::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
  140. {
  141. return getDOMConstructor<JSSpeechInputResultConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
  142. }
  143. JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SpeechInputResult* impl)
  144. {
  145. return wrap<JSSpeechInputResult>(exec, globalObject, impl);
  146. }
  147. SpeechInputResult* toSpeechInputResult(JSC::JSValue value)
  148. {
  149. return value.inherits(&JSSpeechInputResult::s_info) ? static_cast<JSSpeechInputResult*>(asObject(value))->impl() : 0;
  150. }
  151. }
  152. #endif // ENABLE(INPUT_SPEECH)