@Namespace(value="tensorflow") @NoOffset @Properties(inherit=tensorflow.class) public class Status extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
Status()
Create a success status.
|
Status(int code,
BytePointer msg)
\brief Create a status with the specified error code and msg as a
human-readable string containing more detailed information.
|
Status(int code,
String msg) |
Status(long size)
Native array allocator.
|
Status(Pointer p)
Pointer cast constructor.
|
Status(Status s)
Copy the specified status.
|
Modifier and Type | Method and Description |
---|---|
int |
code() |
boolean |
equals(Status x) |
BytePointer |
error_message() |
Status |
getPointer(long i) |
void |
IgnoreError() |
boolean |
notEquals(Status x) |
boolean |
ok()
Returns true iff the status indicates success.
|
static Status |
OK() |
Status |
position(long position) |
void |
put(Status s) |
BytePointer |
ToString()
\brief Return a string representation of this status suitable for
printing.
|
void |
Update(Status new_status)
\brief If
ok() , stores new_status into *this . |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, 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, zero
public Status(Pointer p)
Pointer(Pointer)
.public Status(long size)
Pointer.position(long)
.public Status()
public Status(@Cast(value="tensorflow::error::Code") int code, @tensorflow.StringPiece BytePointer msg)
public Status(@Cast(value="tensorflow::error::Code") int code, @tensorflow.StringPiece String msg)
public Status getPointer(long i)
getPointer
in class Pointer
@StdString public BytePointer error_message()
@Cast(value="bool") @Name(value="operator !=") public boolean notEquals(@Const @ByRef Status x)
public void Update(@Const @ByRef Status new_status)
ok()
, stores new_status
into *this
. If !ok()
,
preserves the current status, but may augment with additional
information about new_status
.
Convenient way of keeping track of the first error encountered.
Instead of:
if (overall_status.ok()) overall_status = new_status
Use:
overall_status.Update(new_status);
@StdString public BytePointer ToString()
"OK"
for success.public void IgnoreError()
Copyright © 2022. All rights reserved.