Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: client/html/generated/html/dartium/Float32Array.dart

Issue 9537001: Generate dart:html bindings for Dartium as well as Frog. All unittests now pass (or are disabled fo… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1
2 class _Float32ArrayImpl extends _ArrayBufferViewImpl implements Float32Array, Li st<num> {
3 _Float32ArrayImpl._wrap(ptr) : super._wrap(ptr);
4
5 int get length() => _wrap(_ptr.length);
6
7 num operator[](int index) => _wrap(_ptr[index]);
8
9
10 void operator[]=(int index, num value) {
11 throw new UnsupportedOperationException("Cannot assign element of immutable List.");
12 }
13
14 void add(num value) {
15 throw new UnsupportedOperationException("Cannot add to immutable List.");
16 }
17
18 void addLast(num value) {
19 throw new UnsupportedOperationException("Cannot add to immutable List.");
20 }
21
22 void addAll(Collection<num> collection) {
23 throw new UnsupportedOperationException("Cannot add to immutable List.");
24 }
25
26 void sort(int compare(num a, num b)) {
27 throw new UnsupportedOperationException("Cannot sort immutable List.");
28 }
29
30 void copyFrom(List<Object> src, int srcStart, int dstStart, int count) {
31 throw new UnsupportedOperationException("This object is immutable.");
32 }
33
34 int indexOf(num element, [int start = 0]) {
35 return _Lists.indexOf(this, element, start, this.length);
36 }
37
38 int lastIndexOf(num element, [int start = null]) {
39 if (start === null) start = length - 1;
40 return _Lists.lastIndexOf(this, element, start);
41 }
42
43 int clear() {
44 throw new UnsupportedOperationException("Cannot clear immutable List.");
45 }
46
47 num removeLast() {
48 throw new UnsupportedOperationException("Cannot removeLast on immutable List .");
49 }
50
51 num last() {
52 return this[length - 1];
53 }
54
55 void forEach(void f(num element)) {
56 _Collections.forEach(this, f);
57 }
58
59 Collection map(f(num element)) {
60 return _Collections.map(this, [], f);
61 }
62
63 Collection<num> filter(bool f(num element)) {
64 return _Collections.filter(this, new List<num>(), f);
65 }
66
67 bool every(bool f(num element)) {
68 return _Collections.every(this, f);
69 }
70
71 bool some(bool f(num element)) {
72 return _Collections.some(this, f);
73 }
74
75 void setRange(int start, int length, List<num> from, [int startFrom]) {
76 throw new UnsupportedOperationException("Cannot setRange on immutable List." );
77 }
78
79 void removeRange(int start, int length) {
80 throw new UnsupportedOperationException("Cannot removeRange on immutable Lis t.");
81 }
82
83 void insertRange(int start, int length, [num initialValue]) {
84 throw new UnsupportedOperationException("Cannot insertRange on immutable Lis t.");
85 }
86
87 List<num> getRange(int start, int length) {
88 throw new NotImplementedException();
89 }
90
91 bool isEmpty() {
92 return length == 0;
93 }
94
95 Iterator<num> iterator() {
96 return new _FixedSizeListIterator<num>(this);
97 }
98
99 void setElements(Object array, [int offset = null]) {
100 if (offset === null) {
101 _ptr.setElements(_unwrap(array));
102 return;
103 } else {
104 _ptr.setElements(_unwrap(array), _unwrap(offset));
105 return;
106 }
107 }
108
109 Float32Array subarray(int start, [int end = null]) {
110 if (end === null) {
111 return _wrap(_ptr.subarray(_unwrap(start)));
112 } else {
113 return _wrap(_ptr.subarray(_unwrap(start), _unwrap(end)));
114 }
115 }
116 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698