FreeWRL / FreeX3D 4.3.0
SFInt32.java
1//AUTOMATICALLY GENERATED BY genfields.pl.
2//DO NOT EDIT!!!!
3
4package vrml.field;
5import vrml.*;
6import java.io.BufferedReader;
7import java.io.PrintWriter;
8import java.io.IOException;
9
10public class SFInt32 extends Field {
11 int value;
12
13 public SFInt32() { }
14
15 public SFInt32(int value) {
16 this.value = value;
17 }
18
19 public int getValue() {
20 __updateRead();
21 return value;
22 }
23
24 public void setValue(int value) {
25 this.value = value;
26 __updateWrite();
27 }
28
29
30 public void setValue(ConstSFInt32 sfInt32) {
31 sfInt32.__updateRead();
32 value = sfInt32.value;
33 __updateWrite();
34 }
35
36 public void setValue(SFInt32 sfInt32) {
37 sfInt32.__updateRead();
38 value = sfInt32.value;
39 __updateWrite();
40 }
41
42
43 public String toString() {
44 __updateRead();
45 return String.valueOf(value);
46 }
47
48 public void __fromPerl(BufferedReader in) throws IOException {
49
50 //System.out.println ("fromPerl, Int32");
51 value = Integer.parseInt(in.readLine());
52 }
53
54 public void __toPerl(PrintWriter out) throws IOException {
55 out.print(value);
56 //out.println();
57 }
58 //public void setOffset(String offs) { this.offset = offs; } //JAS2
59 //public String getOffset() { return this.offset; } //JAS2
60}