~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Source/WebCore/bindings/scripts/test/CPP/WebDOMTestInterface.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

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