/** * Declaration for OctLayer object * * @version a1 Oct 1996 * @author Francis Chan */ public class OctLayer extends OctObject{ // class info public static final String className = "OctLayer"; public static final int octFields = 1; // fields /** * The name of the OctLayer */ public String name; /** * Constructor of an OctLayer (for dynamic creation) * @param octCell The OctCell that the object resides in * @param name The name of the OctLayer */ public OctLayer(OctCell octCell, String name) { this.name = name; this.octCell = octCell; octCell.AddElement(this); OctObjSetup(octCell.port, octFields, className); } /*----------------------------------------------------------- * * the code below is for data backend management * *-----------------------------------------------------------*/ /** * Constructor of an OctLayer (for loading from data back-end server) * @param octCell The OctCell that the object resides in */ public OctLayer(OctCell octCell) { this.octCell = octCell; OctObjSetup(octCell.port, octFields, className); } /** * Performs the neccessary overhead to allow this object to be * manipulated over the network */ protected void SetObjFields() { SetField(0, this.name, PersistentObject.STRING); OctSetField(octFields); } /** * Loads the fields of an OctLayer from data back-end * * @param intId The integer (unique) Id for the object */ public boolean Load(int intId) { if (LoadObject(this.objectClassName, null, intId) == false) { System.out.println("Couldn't load object " + className + " with intId " + intId); return false; } // sets up paramVector so it's ready for field assignment // this.name = GetField(0, PersistentObject.STRING_INDICATOR); OctGetField(octFields); octCell.AddElement(this); OctObjSetup(octCell.port, octFields, className); return succeedTransmit; } /** * Should not be called */ public boolean Load(String strId) { return false; } /** * Does not require filling since the object has no object fields */ protected int GetObjFields() { return OCT.OK; } }