//AUTOMATICALLY GENERATED BY genfields.pl.
//DO NOT EDIT!!!!

package vrml.field;
import vrml.*;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.IOException;

public class ConstSFNode extends ConstField {
     BaseNode node;

    public ConstSFNode() { }

    public ConstSFNode(BaseNode node) {
	        this.node = node;
    }

    public BaseNode getValue() {
        __updateRead();
        return node;
    }

    public String toString() {
        __updateRead();
        return FWHelper.nodeToString(node);
    }

    public void __fromPerl(BufferedReader in)  throws IOException {

	//System.out.println ("fromPerl, Node");
		node = new vrml.node.Node(in.readLine());
    }

    public void __toPerl(PrintWriter out)  throws IOException {
        out.print(node._get_nodeid());
	//out.println();
    }
    //public void setOffset(String offs) { this.offset = offs; } //JAS2
    //public String getOffset() { return this.offset; } //JAS2
}