@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 |
getPointer(long i)
Returns
getPointer(getClass(), 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, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, init, interruptDeallocatorThread, isNull, isNull, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeroprivate static final Logger logger
public BoolPointer(long size)
bool array of the given size.size - the number of bool elements to allocatepublic BoolPointer()
Pointer()public BoolPointer(Pointer p)
Pointer(Pointer)private void allocateArray(long size)
public BoolPointer position(long position)
Pointerarray.position(i)
statement sort of equivalent to the array[i] statement in C++.position in class Pointerposition - the new positionPointer.position(long)public BoolPointer limit(long limit)
Pointerlimit in class Pointerlimit - the new limitPointer.limit(long)public BoolPointer capacity(long capacity)
Pointercapacity in class Pointercapacity - the new capacityPointer.capacity(long)public BoolPointer getPointer(long i)
PointergetPointer(getClass(), i).getPointer in class Pointerpublic 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 © 2025. All rights reserved.