FreeWRL/FreeX3D  3.0.0
ConstSFNode.java
1 //AUTOMATICALLY GENERATED BY genfields.pl.
2 //DO NOT EDIT!!!!
3 
4 package vrml.field;
5 import vrml.*;
6 import java.io.BufferedReader;
7 import java.io.PrintWriter;
8 import java.io.IOException;
9 
10 public class ConstSFNode extends ConstField {
11  BaseNode node;
12 
13  public ConstSFNode() { }
14 
15  public ConstSFNode(BaseNode node) {
16  this.node = node;
17  }
18 
19  public BaseNode getValue() {
20  __updateRead();
21  return node;
22  }
23 
24  public String toString() {
25  __updateRead();
26  return FWHelper.nodeToString(node);
27  }
28 
29  public void __fromPerl(BufferedReader in) throws IOException {
30 
31  //System.out.println ("fromPerl, Node");
32  node = new vrml.node.Node(in.readLine());
33  }
34 
35  public void __toPerl(PrintWriter out) throws IOException {
36  out.print(node._get_nodeid());
37  //out.println();
38  }
39  //public void setOffset(String offs) { this.offset = offs; } //JAS2
40  //public String getOffset() { return this.offset; } //JAS2
41 }