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

« back to all changes in this revision

Viewing changes to Source/WebCore/bindings/scripts/test/V8/V8Float64Array.h

  • 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., 59 Temple Place - Suite 330,
 
18
    Boston, MA 02111-1307, USA.
 
19
*/
 
20
 
 
21
#ifndef V8Float64Array_h
 
22
#define V8Float64Array_h
 
23
 
 
24
#include "V8ArrayBufferView.h"
 
25
#include "V8Binding.h"
 
26
#include "V8DOMWrapper.h"
 
27
#include "WrapperTypeInfo.h"
 
28
#include <v8.h>
 
29
#include <wtf/Float64Array.h>
 
30
#include <wtf/HashMap.h>
 
31
#include <wtf/text/StringHash.h>
 
32
 
 
33
namespace WebCore {
 
34
 
 
35
class V8Float64Array {
 
36
public:
 
37
    static const bool hasDependentLifetime = V8ArrayBufferView::hasDependentLifetime;
 
38
    static bool HasInstance(v8::Handle<v8::Value>);
 
39
    static v8::Persistent<v8::FunctionTemplate> GetRawTemplate();
 
40
    static v8::Persistent<v8::FunctionTemplate> GetTemplate();
 
41
    static Float64Array* toNative(v8::Handle<v8::Object> object)
 
42
    {
 
43
        return reinterpret_cast<Float64Array*>(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
 
44
    }
 
45
    static void derefObject(void*);
 
46
    static WrapperTypeInfo info;
 
47
    static v8::Handle<v8::Value> constructorCallback(const v8::Arguments&);
 
48
    static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
 
49
    static void installPerContextProperties(v8::Handle<v8::Object>, Float64Array*) { }
 
50
    static void installPerContextPrototypeProperties(v8::Handle<v8::Object>) { }
 
51
private:
 
52
    friend v8::Handle<v8::Object> wrap(Float64Array*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
 
53
    static v8::Handle<v8::Object> createWrapper(PassRefPtr<Float64Array>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
 
54
};
 
55
 
 
56
 
 
57
v8::Handle<v8::Object> wrap(Float64Array* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* = 0);
 
58
 
 
59
inline v8::Handle<v8::Object> toV8Object(Float64Array* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
 
60
{
 
61
    if (UNLIKELY(!impl))
 
62
        return v8::Handle<v8::Object>();
 
63
    v8::Handle<v8::Object> wrapper = DOMDataStore::current(isolate)->get(impl);
 
64
    if (!wrapper.IsEmpty())
 
65
        return wrapper;
 
66
    return wrap(impl, creationContext, isolate);
 
67
}
 
68
 
 
69
inline v8::Handle<v8::Value> toV8(Float64Array* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
 
70
{
 
71
    if (UNLIKELY(!impl))
 
72
        return v8NullWithCheck(isolate);
 
73
    v8::Handle<v8::Value> wrapper = DOMDataStore::current(isolate)->get(impl);
 
74
    if (!wrapper.IsEmpty())
 
75
        return wrapper;
 
76
    return wrap(impl, creationContext, isolate);
 
77
}
 
78
 
 
79
inline v8::Handle<v8::Value> toV8(PassRefPtr< Float64Array > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
 
80
{
 
81
    return toV8(impl.get(), creationContext, isolate);
 
82
}
 
83
 
 
84
}
 
85
 
 
86
#endif // V8Float64Array_h