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 "TestInterface.h" 28 #include "WebExceptionHandler.h" 29 #include <wtf/GetPtr.h> 30 #include <wtf/RefPtr.h> 31 32 struct WebDOMTestInterface::WebDOMTestInterfacePrivate { 33 WebDOMTestInterfacePrivate(WebCore::TestInterface* object = 0) 34 : impl(object) 35 { 36 } 37 38 RefPtr<WebCore::TestInterface> impl; 39 }; 40 41 WebDOMTestInterface::WebDOMTestInterface() 42 : WebDOMObject() 43 , m_impl(0) 44 { 45 } 46 47 WebDOMTestInterface::WebDOMTestInterface(WebCore::TestInterface* impl) 48 : WebDOMObject() 49 , m_impl(new WebDOMTestInterfacePrivate(impl)) 50 { 51 } 52 53 WebDOMTestInterface::WebDOMTestInterface(const WebDOMTestInterface& copy) 54 : WebDOMObject() 55 { 56 m_impl = copy.impl() ? new WebDOMTestInterfacePrivate(copy.impl()) : 0; 57 } 58 59 WebDOMTestInterface& WebDOMTestInterface::operator=(const WebDOMTestInterface& copy) 60 { 61 delete m_impl; 62 m_impl = copy.impl() ? new WebDOMTestInterfacePrivate(copy.impl()) : 0; 63 return *this; 64 } 65 66 WebCore::TestInterface* WebDOMTestInterface::impl() const 67 { 68 return m_impl ? m_impl->impl.get() : 0; 69 } 70 71 WebDOMTestInterface::~WebDOMTestInterface() 72 { 73 delete m_impl; 74 m_impl = 0; 75 } 76 77 WebCore::TestInterface* toWebCore(const WebDOMTestInterface& wrapper) 78 { 79 return wrapper.impl(); 80 } 81 82 WebDOMTestInterface toWebKit(WebCore::TestInterface* value) 83 { 84 return WebDOMTestInterface(value); 85 } 86 87 #endif // ENABLE(Condition1) || ENABLE(Condition2) 88