@Name(value="bool") @Properties(inherit=javacpp.class) public class BoolPointer extends Pointer
bool
.
All operations take into account the position and limit, when appropriate.
We need this class because C++ does not define the size of the bool
type.
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.DeallocatorReference, Pointer.DeallocatorThread, Pointer.NativeDeallocator, Pointer.ProxyDeallocator, Pointer.ReferenceCounter
Modifier and Type | Field and Description |
---|---|
private static Logger |
logger |
address, capacity, deallocatorThread, limit, maxBytes, maxPhysicalBytes, maxRetries, position
Constructor and Description |
---|
BoolPointer() |
BoolPointer(long size)
Allocates a native
bool array of the given size. |
BoolPointer(Pointer p) |
Modifier and Type | Method and Description |
---|---|
private void |
allocateArray(long size) |
BoolPointer |
capacity(long capacity)
Sets the capacity and returns this.
|
boolean |
get() |
boolean |
get(long i) |
BoolPointer |
limit(long limit)
Sets the limit and returns this.
|
BoolPointer |
position(long position)
Sets the position and returns this.
|
BoolPointer |
put(boolean b) |
BoolPointer |
put(long i,
boolean b)
Copies the
bool value to the i-th element of a native array. |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, init, isNull, isNull, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zero
private static final Logger logger
public BoolPointer(long size)
bool
array of the given size.size
- the number of bool
elements to allocatepublic BoolPointer()
Pointer.Pointer()
public BoolPointer(Pointer p)
Pointer.Pointer(Pointer)
private void allocateArray(long size)
public BoolPointer position(long position)
Pointer
array.position(i)
statement sort of equivalent to the array[i]
statement in C++.position
in class Pointer
position
- the new positionPointer.position(long)
public BoolPointer limit(long limit)
Pointer
limit
in class Pointer
limit
- the new limitPointer.limit(long)
public BoolPointer capacity(long capacity)
Pointer
capacity
in class Pointer
capacity
- the new capacityPointer.capacity(long)
public boolean get()
get(0)
@Cast(value="bool") public boolean get(long i)
i
- bool
value of a native arraypublic BoolPointer put(boolean b)
put(0, b)
public BoolPointer put(long i, boolean b)
bool
value to the i-th element of a native array.i
- the index into the arrayb
- the bool
value to copyCopyright © 2020. All rights reserved.