FreeWRL / FreeX3D 4.3.0
Field.java
1package vrml;
2import java.io.*;
3
4public abstract class Field implements Cloneable
5{
6 FWJavaScriptBinding __binding = null;
7 String offset = "0 -1 0"; // type, offset of -1, length of zero
8
9 public Object clone() {
10 try {
11 Field f = (Field) super.clone();
12 f.__binding = null;
13 return f;
14 } catch (CloneNotSupportedException ex) {
15 throw new InternalError();
16 }
17 }
18
19 public void bind_to(FWJavaScriptBinding b) {
20 __binding = b;
21 }
22
23 public final void __updateRead() {
24 if (__binding != null)
25 __binding.updateRead(this);
26 }
27 protected final void __updateWrite() {
28 if (__binding != null)
29 __binding.updateWrite(this);
30 }
31
32 public abstract void __fromPerl(BufferedReader in) throws IOException;
33 public abstract void __toPerl(PrintWriter out) throws IOException;
34
35 public void setOffset(String offs) { this.offset = offs; } //JAS2
36 public String getOffset() { return this.offset; } //JAS2
37
38
39}
40
41