org.ptolemy.fmi
Class FMULibrary.FMUAllocateMemory

java.lang.Object
  extended by org.ptolemy.fmi.FMULibrary.FMUAllocateMemory
All Implemented Interfaces:
com.sun.jna.Callback, FMILibrary.FMICallbackAllocateMemory
Enclosing interface:
FMULibrary

public static class FMULibrary.FMUAllocateMemory
extends java.lang.Object
implements FMILibrary.FMICallbackAllocateMemory

Allocate memory.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.sun.jna.Callback
com.sun.jna.Callback.UncaughtExceptionHandler
 
Field Summary
static java.util.Set<com.sun.jna.Pointer> pointers
          Keep references to memory that has been allocated and avoid problems with the memory being garbage collected.
 
Fields inherited from interface com.sun.jna.Callback
FORBIDDEN_NAMES, METHOD_NAME
 
Constructor Summary
FMULibrary.FMUAllocateMemory()
           
 
Method Summary
 com.sun.jna.Pointer apply(NativeSizeT numberOfObjects, NativeSizeT size)
          Allocate memory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pointers

public static java.util.Set<com.sun.jna.Pointer> pointers
Keep references to memory that has been allocated and avoid problems with the memory being garbage collected.

Constructor Detail

FMULibrary.FMUAllocateMemory

public FMULibrary.FMUAllocateMemory()
Method Detail

apply

public com.sun.jna.Pointer apply(NativeSizeT numberOfObjects,
                                 NativeSizeT size)
Allocate memory.

Specified by:
apply in interface FMILibrary.FMICallbackAllocateMemory
Parameters:
numberOfObjects - The number of objects to allocate.
size - The size of the object in bytes.
Returns:
a Pointer to the allocated memory.