Class COM.odi.jcpp.intPU

java.lang.Object
   |
   +----COM.odi.jcpp.intPU

public class intPU
extends Object
The intPU class is the unsafe counterpart class for the intP class. The intPU class contains static methods for unsafe operations on instances of the associated peer class, intP. Unsafe operations include operations such as array access and casting.


Method Index

 o cast(PeerPointer)
Creates an intP object and uses the same linear object reference (linear address) as the specified peer pointer object.
 o deleteArray(intP)
Deallocates a C++ array that contains elements of type int.
 o makeArray(Segment, int)
Creates a C++ array of the specified size in the specified segment.
 o ref(intP, int)
Returns a particular element from the specified C++ array.
 o set(intP, int, int)
Sets the array element in the specified position to the specified value.

Methods

 o makeArray
  public static intP makeArray(Segment s,
                               int size)
Creates a C++ array of the specified size in the specified segment. Each element can contain an element of type int.

Parameters:
s - The segment in which to allocate the array.

size - The number of elements in the array.

Returns:
An intP object whose linear address refers to the newly created object.
 o deleteArray
  public static void deleteArray(intP theArray)
Deallocates a C++ array that contains elements of type int.

Parameters:
theArray - The C++ array you want to delete.

 o ref
  public static int ref(intP theArray,
                        int index)
Returns a particular element from the specified C++ array.

Parameters:
theArray - The array that contains the element you want.

index - The position of the desired element in the array. Postions begin at 0. If you want the third element, specify 2.

Returns:
The element at the specified position.
 o set
  public static void set(intP theArray,
                         int index,
                         int newValue)
Sets the array element in the specified position to the specified value.

Parameters:
theArray - The array that contains the element for which you want to specify a value.

index - The position of the element in the array.
newValue - The value for the element in the specified position.
 o cast
  public static intP cast(PeerPointer p)
Creates an intP object and uses the same linear object reference (linear address) as the specified peer pointer object. Typically, this is useful when you have a return value of type voidP and you know it should be of type intP.

Parameters:
p - The peer pointer object whose linear address you want to copy.

Returns:
The newly created intP object.

Copyright © 1996, 1997, 1998 Object Design, Inc. All rights reserved.