Reality Interface Classes

com.northgateis.reality.rsc
Class RSCParam

java.lang.Object
 |
 +--com.northgateis.reality.rsc.RSCParam

public class RSCParam
extends java.lang.Object

Provides a descriptor for each parameter passed to or from a subroutine.

It is not necessary to set a parameters direction as it defaults to INOUT. However if passing a large number of parameters, or a few large parameters, then setting a parameters direction can significantly improve performance. (Assuming all of the data does not need to be passed in both directions).

Another way to improve performance is for the DataBasic subroutine to null out any parameters that do not need to be returned.

See the description of RSC class for an example of using this class.


Field Summary
static int IN
          Parameter is an input to a subroutine
static int INOUT
          Parameter is both input to and output from a subroutine.
static int OUT
          Parameter is an output from a subroutine
static int UNKNOWN
          Parameter direction is unknown
 
Constructor Summary
RSCParam(java.lang.String name, int position)
           
RSCParam(java.lang.String name, int position, int size)
           
 
Method Summary
 intgetDirection()
          get parameters direction
 java.lang.StringgetName()
          get the parameters name
 intgetPosition()
          get the parameters position (index) in the paramer list
 java.lang.StringgetString()
          get the parameters value as a string
 byte[]getValue()
          get parameters value
 voidsetDirection(int t)
          set parameters direction
 voidsetValue(byte[] v)
          set parameters value as a byte array
 voidsetValue(byte[] v, int start, int len)
           
 voidsetValue(java.lang.String v)
          set parameters value as a string
 java.lang.StringtoString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IN

public static final int IN
Parameter is an input to a subroutine

OUT

public static final int OUT
Parameter is an output from a subroutine

INOUT

public static final int INOUT
Parameter is both input to and output from a subroutine. This is the default.

UNKNOWN

public static final int UNKNOWN
Parameter direction is unknown
Constructor Detail

RSCParam

public RSCParam(java.lang.String name,
 int position)

RSCParam

public RSCParam(java.lang.String name,
 int position,
 int size)
Method Detail

getName

public java.lang.String getName()
get the parameters name
Returns:
the parameters name

getPosition

public int getPosition()
get the parameters position (index) in the paramer list
Returns:
the parameters position

setDirection

public void setDirection(int t)
set parameters direction

getDirection

public int getDirection()
get parameters direction

getValue

public byte[] getValue()
get parameters value

getString

public java.lang.String getString()
get the parameters value as a string

setValue

public void setValue(java.lang.String v)
set parameters value as a string

setValue

public void setValue(byte[] v)
set parameters value as a byte array

setValue

public void setValue(byte[] v,
 int start,
 int len)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Reality Interface Classes

Copyright (c) 2000 NEC Software Services (UK) Limited