major software code reorg
[fleet.git] / src / edu / berkeley / fleet / interpreter / DataOutbox.java
1 package edu.berkeley.fleet.interpreter;
2 import edu.berkeley.fleet.api.*;
3
4 public class DataOutbox extends Outbox {
5
6     public DataOutbox(InterpreterShip ship, String name) { super(ship, name); }
7     public DataOutbox(InterpreterShip ship, String name, boolean special) {
8         super(ship, name); this.special = special; }
9     public DataOutbox(InterpreterShip ship, String name, boolean special, boolean ihorn) {
10         super(ship, name); this.special = special; this.ihorn = ihorn; }
11     public DataOutbox(InterpreterShip ship, String name, boolean special, boolean ihorn, boolean dhorn) {
12         super(ship, name); this.special = special; this.ihorn = ihorn; this.dhorn = dhorn; }
13
14     private Interpreter getInterpreter() { return ((InterpreterShip)getShip()).getInterpreter(); }
15     public void addDataFromShip(int data) {
16         addItemFromShip(data);
17     }
18
19     public boolean readyForDataFromShip() {
20         return super.readyForItemFromShip();
21     }
22
23     protected void send(InterpreterBenkoBox port, int data) {
24         getInterpreter().sendData(this, data, port);
25     }
26 }