public final class LongLongByReference extends AbstractNumberReference<Long>
For example, the following C code,
extern void get_a(long long * ap); long long foo(void) { long long a; // pass a reference to 'a' so get_a() can fill it out get_a(&a); return a; }
Would be declared in java as
interface Lib { void get_a(@Out LongLongByReference ap); }
and used like this
LongLongByReference ap = new LongLongByReference(); lib.get_a(ap); System.out.printf("a from lib=%d\n", a.longValue());
Constructor and Description |
---|
LongLongByReference()
Creates a new reference to a long long value initialized to zero.
|
LongLongByReference(long value)
Creates a new reference to a native longlong value
|
LongLongByReference(Long value)
Creates a new reference to a native longlong value
|
Modifier and Type | Method and Description |
---|---|
void |
marshal(Pointer memory,
long offset)
Copies the value to native memory
|
int |
nativeSize(Runtime runtime)
Gets the native size of type of reference in bytes.
|
void |
unmarshal(Pointer memory,
long offset)
Copies the value from native memory
|
byteValue, checkNull, doubleValue, floatValue, getValue, intValue, longValue, shortValue
public LongLongByReference()
public LongLongByReference(Long value)
value
- the initial native valuepublic LongLongByReference(long value)
value
- the initial native valuepublic void marshal(Pointer memory, long offset)
memory
- the native memory bufferpublic void unmarshal(Pointer memory, long offset)
memory
- the native memory buffer.public final int nativeSize(Runtime runtime)
Copyright © 2014. All rights reserved.