SFE.BOAL
Class IO

java.lang.Object
  extended by SFE.BOAL.IO
All Implemented Interfaces:
java.io.Serializable

public class IO
extends java.lang.Object
implements java.io.Serializable

IO An IO object describes an interaction with Alice or Bob for input/output.

Author:
: Dahlia Malkhi and Yaron Sella
See Also:
Serialized Form

Constructor Summary
IO(boolean is_alice)
          Constructor for class IO
 
Method Summary
 void addLinenum(int line_num)
          addLinenum: add a line-number for the list of gate-wires that this IO object is responsible for.
 int getLinenum(int index)
          getLinenum: get the line number of gate wire at the specified index.
 int getNLines()
          getNLines: get the number of lines specified for this IO.
 java.lang.String getPrefix()
          getPrefix: get the prefix string
 boolean isAlice()
          isAlice: get the Alice/Bob indicator boolean flag
 boolean isInput()
          isInput: get the input/output indicator boolean flag
 void setInputFlag(boolean is_input)
          setInputFlag: set the input/output indicator flag
 void setLinenum(int index, int val)
           
 void setPrefix(java.lang.String str)
          setPrefix: set the prefix string
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IO

public IO(boolean is_alice)
Constructor for class IO

Parameters:
is_alice - - boolean indicating if this is IO format for Alice or Bob.
Method Detail

setInputFlag

public void setInputFlag(boolean is_input)
setInputFlag: set the input/output indicator flag

Parameters:
is_input - - boolean indicating wether this IO is for input or output.

isAlice

public boolean isAlice()
isAlice: get the Alice/Bob indicator boolean flag

Returns:
a boolean indicating whether this is Alice or Bob.

isInput

public boolean isInput()
isInput: get the input/output indicator boolean flag

Returns:
a boolean indicating whether this is an input or output IO.

setPrefix

public void setPrefix(java.lang.String str)
setPrefix: set the prefix string

Parameters:
str - - the prefix string.

getPrefix

public java.lang.String getPrefix()
getPrefix: get the prefix string

Returns:
the prefix string.

addLinenum

public void addLinenum(int line_num)
addLinenum: add a line-number for the list of gate-wires that this IO object is responsible for.

Parameters:
line_num - - the line number

getLinenum

public int getLinenum(int index)
getLinenum: get the line number of gate wire at the specified index.

Parameters:
index - the index of the IO bit we are intersted in
Returns:
the line number of the gate wire for the desingated IO bit

setLinenum

public void setLinenum(int index,
                       int val)

getNLines

public int getNLines()
getNLines: get the number of lines specified for this IO.

Returns:
the number of lines.