|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jniwrapper.Parameter | +--com.jniwrapper.Structure | +--com.jniwrapper.ComplexArray
Represents an array of objects.
All objects in array must have the same type.
Note: If function takes an array as its parameter, you should take Pointer referencing that ComplexArray object, instead of direct taking ComplexArray instance.
Constructor Summary | |
ComplexArray(Parameter[] arr)
Constructs array object taking specified Parameter array. |
|
ComplexArray(Parameter sample,
int count)
Constructs array object. |
Method Summary | |
java.lang.Object |
clone()
|
void |
forceElementCount(int elementCount)
Sets new array size without memory reallocation. |
void |
fromParameterArray(Parameter[] params)
Sets array content to the given values. |
Parameter |
getElement(int i)
Returns array item specified by an index. |
int |
getElementCount()
Returns the number of elements in the array. |
void |
setElement(int i,
Parameter elem)
Replaces array item with the specified object. |
void |
setElementCount(int elementCount)
Resizes this array to a given size. |
Parameter[] |
toParameterArray()
Returns items as Java array. |
java.lang.String |
toString()
|
void |
write(byte[] arr,
int offset)
Writes the parameter value to a byte array. |
Methods inherited from class com.jniwrapper.Structure |
acceptIOPerformer, computeLength, getLength, getMember, getMembers, init, init, pop, read, setBuffer, write |
Methods inherited from class com.jniwrapper.Parameter |
asReturnValue, equals, getAlignedLength, getBuffer, getOffset, indent, push, read, toByteArray |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ComplexArray(Parameter[] arr)
Parameter
array.
public ComplexArray(Parameter sample, int count)
sample
- Sample for items in constructed arraycount
- Count of items in constructed arrayMethod Detail |
public void write(byte[] arr, int offset)
Parameter
write
in class Parameter
public java.lang.Object clone()
clone
in class Structure
public Parameter getElement(int i)
ArrayParameter
getElement
in interface ArrayParameter
i
- index of requested array itempublic void setElement(int i, Parameter elem)
ArrayParameter
setElement
in interface ArrayParameter
i
- index of an item to be replacedelem
- object to be set as array itempublic int getElementCount()
ArrayParameter
getElementCount
in interface ArrayParameter
public Parameter[] toParameterArray()
ArrayParameter
toParameterArray
in interface ArrayParameter
public void fromParameterArray(Parameter[] params)
ArrayParameter
fromParameterArray
in interface ArrayParameter
public java.lang.String toString()
toString
in class Structure
public void forceElementCount(int elementCount)
ArrayParameter
forceElementCount
in interface ArrayParameter
public void setElementCount(int elementCount)
ArrayParameter
setElementCount
in interface ArrayParameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |