ibis.gmi
Class ParameterVector

java.lang.Object
  extended by ibis.gmi.ParameterVector

public abstract class ParameterVector
extends Object

The ParameterVector class provides a base class for generated parameter vector classes, specific for a group method.


Field Summary
 boolean done
          Set to true when the parameter vector is completely initialized.
 
Method Summary
 ParameterVector getVector()
          Creates a new parameter vector of the same type.
 boolean readBoolean(int num)
          Get a boolean from position "num" in the parameter vector.
 byte readByte(int num)
          Get a byte from position "num" in the parameter vector.
 char readChar(int num)
          Get a char from position "num" in the parameter vector.
 double readDouble(int num)
          Get a double from position "num" in the parameter vector.
 float readFloat(int num)
          Get a float from position "num" in the parameter vector.
 int readInt(int num)
          Get a int from position "num" in the parameter vector.
 long readLong(int num)
          Get a long from position "num" in the parameter vector.
 Object readObject(int num)
          Get a Object from position "num" in the parameter vector.
abstract  ParameterVector readParameters(ibis.ipl.ReadMessage r)
          Reads a parameter vector from a message.
 short readShort(int num)
          Get a short from position "num" in the parameter vector.
 void write(int num, boolean value)
          Places a boolean value in parameter number "num".
 void write(int num, byte value)
          Places a byte value in parameter number "num".
 void write(int num, char value)
          Places a char value in parameter number "num".
 void write(int num, double value)
          Places a double value in parameter number "num".
 void write(int num, float value)
          Places a float value in parameter number "num".
 void write(int num, int value)
          Places an int value in parameter number "num".
 void write(int num, long value)
          Places a long value in parameter number "num".
 void write(int num, Object value)
          Places an Object value in parameter number "num".
 void write(int num, short value)
          Places a short value in parameter number "num".
abstract  void writeParameters(ibis.ipl.WriteMessage w)
          Writes this parameter vector to a message.
 void writeSubArray(int num, int offset, int size, boolean[] value)
          Records in the parameter vector that parameter "num" is a sub-array of boolean array "value", with offset "offset" and length "size".
 void writeSubArray(int num, int offset, int size, byte[] value)
          Records in the parameter vector that parameter "num" is a sub-array of byte array "value", with offset "offset" and length "size".
 void writeSubArray(int num, int offset, int size, char[] value)
          Records in the parameter vector that parameter "num" is a sub-array of char array "value", with offset "offset" and length "size".
 void writeSubArray(int num, int offset, int size, double[] value)
          Records in the parameter vector that parameter "num" is a sub-array of double array "value", with offset "offset" and length "size".
 void writeSubArray(int num, int offset, int size, float[] value)
          Records in the parameter vector that parameter "num" is a sub-array of float array "value", with offset "offset" and length "size".
 void writeSubArray(int num, int offset, int size, int[] value)
          Records in the parameter vector that parameter "num" is a sub-array of int array "value", with offset "offset" and length "size".
 void writeSubArray(int num, int offset, int size, long[] value)
          Records in the parameter vector that parameter "num" is a sub-array of long array "value", with offset "offset" and length "size".
 void writeSubArray(int num, int offset, int size, Object[] value)
          Records in the parameter vector that parameter "num" is a sub-array of Object array "value", with offset "offset" and length "size".
 void writeSubArray(int num, int offset, int size, short[] value)
          Records in the parameter vector that parameter "num" is a sub-array of short array "value", with offset "offset" and length "size".
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

done

public boolean done
Set to true when the parameter vector is completely initialized.

Method Detail

readParameters

public abstract ParameterVector readParameters(ibis.ipl.ReadMessage r)
                                        throws IOException
Reads a parameter vector from a message.

Parameters:
r - the message from which the parameters are to be read
Returns:
The resulting parameter vector.
Throws:
IOException - some network error occurred

writeParameters

public abstract void writeParameters(ibis.ipl.WriteMessage w)
                              throws IOException
Writes this parameter vector to a message.

Parameters:
w - the message to which the parameters are to be appended
Throws:
IOException - some network error occurred

getVector

public ParameterVector getVector()
Creates a new parameter vector of the same type.

Returns:
the new parameter vector.

write

public void write(int num,
                  boolean value)
Places a boolean value in parameter number "num".

Parameters:
num - the parameter number, ranging from 0 .. #parameters-1
value - the value to be stored

write

public void write(int num,
                  byte value)
Places a byte value in parameter number "num".

Parameters:
num - the parameter number, ranging from 0 .. #parameters-1
value - the value to be stored

write

public void write(int num,
                  short value)
Places a short value in parameter number "num".

Parameters:
num - the parameter number, ranging from 0 .. #parameters-1
value - the value to be stored

write

public void write(int num,
                  char value)
Places a char value in parameter number "num".

Parameters:
num - the parameter number, ranging from 0 .. #parameters-1
value - the value to be stored

write

public void write(int num,
                  int value)
Places an int value in parameter number "num".

Parameters:
num - the parameter number, ranging from 0 .. #parameters-1
value - the value to be stored

write

public void write(int num,
                  long value)
Places a long value in parameter number "num".

Parameters:
num - the parameter number, ranging from 0 .. #parameters-1
value - the value to be stored

write

public void write(int num,
                  float value)
Places a float value in parameter number "num".

Parameters:
num - the parameter number, ranging from 0 .. #parameters-1
value - the value to be stored

write

public void write(int num,
                  double value)
Places a double value in parameter number "num".

Parameters:
num - the parameter number, ranging from 0 .. #parameters-1
value - the value to be stored

write

public void write(int num,
                  Object value)
Places an Object value in parameter number "num".

Parameters:
num - the parameter number, ranging from 0 .. #parameters-1
value - the value to be stored

writeSubArray

public void writeSubArray(int num,
                          int offset,
                          int size,
                          boolean[] value)
Records in the parameter vector that parameter "num" is a sub-array of boolean array "value", with offset "offset" and length "size". Copying does not necessarily take place.

Parameters:
num - The parameter number, ranging from 0 .. #parameters-1.
offset - Offset in the array where the sub-array begins.
size - Length (number of elements) in the sub-array.
value - The array of which a sub-array is the parameter.

writeSubArray

public void writeSubArray(int num,
                          int offset,
                          int size,
                          byte[] value)
Records in the parameter vector that parameter "num" is a sub-array of byte array "value", with offset "offset" and length "size". Copying does not necessarily take place.

Parameters:
num - The parameter number, ranging from 0 .. #parameters-1.
offset - Offset in the array where the sub-array begins.
size - Length (number of elements) in the sub-array.
value - The array of which a sub-array is the parameter.

writeSubArray

public void writeSubArray(int num,
                          int offset,
                          int size,
                          short[] value)
Records in the parameter vector that parameter "num" is a sub-array of short array "value", with offset "offset" and length "size". Copying does not necessarily take place.

Parameters:
num - The parameter number, ranging from 0 .. #parameters-1.
offset - Offset in the array where the sub-array begins.
size - Length (number of elements) in the sub-array.
value - The array of which a sub-array is the parameter.

writeSubArray

public void writeSubArray(int num,
                          int offset,
                          int size,
                          char[] value)
Records in the parameter vector that parameter "num" is a sub-array of char array "value", with offset "offset" and length "size". Copying does not necessarily take place.

Parameters:
num - The parameter number, ranging from 0 .. #parameters-1.
offset - Offset in the array where the sub-array begins.
size - Length (number of elements) in the sub-array.
value - The array of which a sub-array is the parameter.

writeSubArray

public void writeSubArray(int num,
                          int offset,
                          int size,
                          int[] value)
Records in the parameter vector that parameter "num" is a sub-array of int array "value", with offset "offset" and length "size". Copying does not necessarily take place.

Parameters:
num - The parameter number, ranging from 0 .. #parameters-1.
offset - Offset in the array where the sub-array begins.
size - Length (number of elements) in the sub-array.
value - The array of which a sub-array is the parameter.

writeSubArray

public void writeSubArray(int num,
                          int offset,
                          int size,
                          long[] value)
Records in the parameter vector that parameter "num" is a sub-array of long array "value", with offset "offset" and length "size". Copying does not necessarily take place.

Parameters:
num - The parameter number, ranging from 0 .. #parameters-1.
offset - Offset in the array where the sub-array begins.
size - Length (number of elements) in the sub-array.
value - The array of which a sub-array is the parameter.

writeSubArray

public void writeSubArray(int num,
                          int offset,
                          int size,
                          float[] value)
Records in the parameter vector that parameter "num" is a sub-array of float array "value", with offset "offset" and length "size". Copying does not necessarily take place.

Parameters:
num - The parameter number, ranging from 0 .. #parameters-1.
offset - Offset in the array where the sub-array begins.
size - Length (number of elements) in the sub-array.
value - The array of which a sub-array is the parameter.

writeSubArray

public void writeSubArray(int num,
                          int offset,
                          int size,
                          double[] value)
Records in the parameter vector that parameter "num" is a sub-array of double array "value", with offset "offset" and length "size". Copying does not necessarily take place.

Parameters:
num - The parameter number, ranging from 0 .. #parameters-1.
offset - Offset in the array where the sub-array begins.
size - Length (number of elements) in the sub-array.
value - The array of which a sub-array is the parameter.

writeSubArray

public void writeSubArray(int num,
                          int offset,
                          int size,
                          Object[] value)
Records in the parameter vector that parameter "num" is a sub-array of Object array "value", with offset "offset" and length "size". Copying does not necessarily take place.

Parameters:
num - The parameter number, ranging from 0 .. #parameters-1.
offset - Offset in the array where the sub-array begins.
size - Length (number of elements) in the sub-array.
value - The array of which a sub-array is the parameter.

readBoolean

public boolean readBoolean(int num)
Get a boolean from position "num" in the parameter vector.

Parameters:
num - The position number in the parameter vector.
Returns:
The boolean requested.

readByte

public byte readByte(int num)
Get a byte from position "num" in the parameter vector.

Parameters:
num - The position number in the parameter vector.
Returns:
The boolean requested.

readShort

public short readShort(int num)
Get a short from position "num" in the parameter vector.

Parameters:
num - The position number in the parameter vector.
Returns:
The boolean requested.

readChar

public char readChar(int num)
Get a char from position "num" in the parameter vector.

Parameters:
num - The position number in the parameter vector.
Returns:
The boolean requested.

readInt

public int readInt(int num)
Get a int from position "num" in the parameter vector.

Parameters:
num - The position number in the parameter vector.
Returns:
The boolean requested.

readLong

public long readLong(int num)
Get a long from position "num" in the parameter vector.

Parameters:
num - The position number in the parameter vector.
Returns:
The boolean requested.

readFloat

public float readFloat(int num)
Get a float from position "num" in the parameter vector.

Parameters:
num - The position number in the parameter vector.
Returns:
The boolean requested.

readDouble

public double readDouble(int num)
Get a double from position "num" in the parameter vector.

Parameters:
num - The position number in the parameter vector.
Returns:
The boolean requested.

readObject

public Object readObject(int num)
Get a Object from position "num" in the parameter vector.

Parameters:
num - The position number in the parameter vector.
Returns:
The boolean requested.


The Ibis project