
io.qt.core.QCborError Maven / Gradle / Ivy
package io.qt.core;
/**
* Holds the error condition found while parsing or validating a CBOR stream
* Java wrapper for Qt class QCborError
*/
public class QCborError extends io.qt.QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QCborError.class);
/**
* Java wrapper for Qt enum QCborError::Code
*/
public enum Code implements io.qt.QtEnumerator {
UnknownError(1),
AdvancePastEnd(3),
InputOutputError(4),
GarbageAtEnd(256),
EndOfFile(257),
UnexpectedBreak(258),
UnknownType(259),
IllegalType(260),
IllegalNumber(261),
IllegalSimpleType(262),
InvalidUtf8String(516),
DataTooLarge(1024),
NestingTooDeep(1025),
UnsupportedType(1026),
NoError(0);
private Code(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static Code resolve(int value) {
switch (value) {
case 1: return UnknownError;
case 3: return AdvancePastEnd;
case 4: return InputOutputError;
case 256: return GarbageAtEnd;
case 257: return EndOfFile;
case 258: return UnexpectedBreak;
case 259: return UnknownType;
case 260: return IllegalType;
case 261: return IllegalNumber;
case 262: return IllegalSimpleType;
case 516: return InvalidUtf8String;
case 1024: return DataTooLarge;
case 1025: return NestingTooDeep;
case 1026: return UnsupportedType;
case 0: return NoError;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
public QCborError(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QCborError instance);
@io.qt.QtUninvokable
private final boolean operator_equal(io.qt.core.QCborError value2){
return operator_equal_native_cref_QCborError(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(value2));
}
@io.qt.QtUninvokable
private native boolean operator_equal_native_cref_QCborError(long __this__nativeId, long value2);
/**
* See QCborError::toString()const
*/
@io.qt.QtUninvokable
public final java.lang.String toString(){
return toString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native java.lang.String toString_native_constfct(long __this__nativeId);
@io.qt.QtUninvokable
public final void setCode(io.qt.core.QCborError.Code code){
setCode_native_cref_QCborError_Code(QtJambi_LibraryUtilities.internal.nativeId(this), code.value());
}
@io.qt.QtUninvokable
private native void setCode_native_cref_QCborError_Code(long __this__nativeId, int code);
@io.qt.QtUninvokable
public final io.qt.core.QCborError.Code code(){
return io.qt.core.QCborError.Code.resolve(code_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int code_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QCborError(QPrivateConstructor p) { super(p); }
@Override
@io.qt.QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.core.QCborError) {
return operator_equal((io.qt.core.QCborError) other);
}
return false;
}
@io.qt.QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native static int hashCode_native(long __this_nativeId);
@Override
public QCborError clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native QCborError clone_native(long __this_nativeId);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy