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 23#if ENABLE(Condition1) || ENABLE(Condition2) 24 25#include "WebDOMTestInterface.h" 26 27#include "KURL.h" 28#include "Node.h" 29#include "TestInterface.h" 30#include "TestSupplemental.h" 31#include "WebDOMNode.h" 32#include "WebDOMString.h" 33#include "WebExceptionHandler.h" 34#include <wtf/GetPtr.h> 35#include <wtf/RefPtr.h> 36#include <wtf/text/AtomicString.h> 37 38struct WebDOMTestInterface::WebDOMTestInterfacePrivate { 39 WebDOMTestInterfacePrivate(WebCore::TestInterface* object = 0) 40 : impl(object) 41 { 42 } 43 44 RefPtr<WebCore::TestInterface> impl; 45}; 46 47WebDOMTestInterface::WebDOMTestInterface() 48 : WebDOMObject() 49 , m_impl(0) 50{ 51} 52 53WebDOMTestInterface::WebDOMTestInterface(WebCore::TestInterface* impl) 54 : WebDOMObject() 55 , m_impl(new WebDOMTestInterfacePrivate(impl)) 56{ 57} 58 59WebDOMTestInterface::WebDOMTestInterface(const WebDOMTestInterface& copy) 60 : WebDOMObject() 61{ 62 m_impl = copy.impl() ? new WebDOMTestInterfacePrivate(copy.impl()) : 0; 63} 64 65WebDOMTestInterface& WebDOMTestInterface::operator=(const WebDOMTestInterface& copy) 66{ 67 delete m_impl; 68 m_impl = copy.impl() ? new WebDOMTestInterfacePrivate(copy.impl()) : 0; 69 return *this; 70} 71 72WebCore::TestInterface* WebDOMTestInterface::impl() const 73{ 74 return m_impl ? WTF::getPtr(m_impl->impl) : 0; 75} 76 77WebDOMTestInterface::~WebDOMTestInterface() 78{ 79 delete m_impl; 80 m_impl = 0; 81} 82 83#if ENABLE(Condition11) || ENABLE(Condition12) 84WebDOMString WebDOMTestInterface::supplementalStr1() const 85{ 86 if (!impl()) 87 return WebDOMString(); 88 89 return static_cast<const WTF::String&>(TestSupplemental::supplementalStr1(impl())); 90} 91 92#endif 93#if ENABLE(Condition11) || ENABLE(Condition12) 94WebDOMString WebDOMTestInterface::supplementalStr2() const 95{ 96 if (!impl()) 97 return WebDOMString(); 98 99 return static_cast<const WTF::String&>(TestSupplemental::supplementalStr2(impl())); 100} 101 102void WebDOMTestInterface::setSupplementalStr2(const WebDOMString& newSupplementalStr2) 103{ 104 if (!impl()) 105 return; 106 107 TestSupplemental::setSupplementalStr2(impl(), newSupplementalStr2); 108} 109 110#endif 111#if ENABLE(Condition11) || ENABLE(Condition12) 112WebDOMNode WebDOMTestInterface::supplementalNode() const 113{ 114 if (!impl()) 115 return WebDOMNode(); 116 117 return toWebKit(WTF::getPtr(TestSupplemental::supplementalNode(impl()))); 118} 119 120void WebDOMTestInterface::setSupplementalNode(const WebDOMNode& newSupplementalNode) 121{ 122 if (!impl()) 123 return; 124 125 TestSupplemental::setSupplementalNode(impl(), toWebCore(newSupplementalNode)); 126} 127 128#endif 129 130#if ENABLE(Condition11) || ENABLE(Condition12) 131void WebDOMTestInterface::supplementalMethod1() 132{ 133 if (!impl()) 134 return; 135 136 WebCore::TestSupplemental::supplementalMethod1(impl()); 137} 138 139#endif 140 141 142#if ENABLE(Condition11) || ENABLE(Condition12) 143void WebDOMTestInterface::supplementalMethod4() 144{ 145 if (!impl()) 146 return; 147 148 WebCore::TestSupplemental::supplementalMethod4(impl()); 149} 150 151#endif 152 153WebCore::TestInterface* toWebCore(const WebDOMTestInterface& wrapper) 154{ 155 return wrapper.impl(); 156} 157 158WebDOMTestInterface toWebKit(WebCore::TestInterface* value) 159{ 160 return WebDOMTestInterface(value); 161} 162 163#endif // ENABLE(Condition1) || ENABLE(Condition2) 164