io.qt.core.QCborStreamWriter Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.core;
import io.qt.*;
/**
* Simple CBOR encoder operating on a one-way stream
* Java wrapper for Qt class QCborStreamWriter
*/
public class QCborStreamWriter extends QtObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
@QtPropertyMember(enabled=false)
private Object __rcDevice;
/**
* See QCborStreamWriter:: QCborStreamWriter(QByteArray*)
* @param data
*/
public QCborStreamWriter(io.qt.core.@Nullable QByteArray data){
super((QPrivateConstructor)null);
initialize_native(this, data);
if (QtJambi_LibraryUtilities.internal.needsReferenceCounting(data)) {
__rcDevice = data;
}else{
__rcDevice = null;
}
}
private native static void initialize_native(QCborStreamWriter instance, io.qt.core.QByteArray data);
/**
* See QCborStreamWriter:: QCborStreamWriter(QIODevice*)
* @param device
*/
public QCborStreamWriter(io.qt.core.@Nullable QIODevice device){
super((QPrivateConstructor)null);
initialize_native(this, device);
if (QtJambi_LibraryUtilities.internal.needsReferenceCounting(device)) {
__rcDevice = device;
}else{
__rcDevice = null;
}
}
private native static void initialize_native(QCborStreamWriter instance, io.qt.core.QIODevice device);
/**
* See QCborStreamWriter:: append(QByteArray)
* @param ba
*/
@QtUninvokable
public final void append(io.qt.core.@NonNull QByteArray ba){
append_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(ba));
}
@QtUninvokable
private native void append_native_cref_QByteArray(long __this__nativeId, long ba);
/**
* See QCborStreamWriter:: append(QCborKnownTags)
* @param tag
*/
@QtUninvokable
public final void append(io.qt.core.@NonNull QCborKnownTags tag){
append_native_QCborKnownTags(QtJambi_LibraryUtilities.internal.nativeId(this), tag.value());
}
@QtUninvokable
private native void append_native_QCborKnownTags(long __this__nativeId, int tag);
/**
* See QCborStreamWriter:: append(QCborSimpleType)
* @param st
*/
@QtUninvokable
public final void append(io.qt.core.@NonNull QCborSimpleType st){
append_native_QCborSimpleType(QtJambi_LibraryUtilities.internal.nativeId(this), st.value());
}
@QtUninvokable
private native void append_native_QCborSimpleType(long __this__nativeId, byte st);
/**
* See QCborStreamWriter:: append(QCborTag)
* @param tag
*/
@QtUninvokable
public final void append(io.qt.core.@NonNull QCborTag tag){
append_native_QCborTag(QtJambi_LibraryUtilities.internal.nativeId(this), tag.value());
}
@QtUninvokable
private native void append_native_QCborTag(long __this__nativeId, long tag);
/**
* See QCborStreamWriter:: append(QStringView)
* @param str
*/
@QtUninvokable
public final void append(java.lang.@NonNull String str){
append_native_QStringView(QtJambi_LibraryUtilities.internal.nativeId(this), str);
}
@QtUninvokable
private native void append_native_QStringView(long __this__nativeId, java.lang.String str);
/**
* See QCborStreamWriter:: append(bool)
* @param b
*/
@QtUninvokable
public final void append(boolean b){
append_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), b);
}
@QtUninvokable
private native void append_native_bool(long __this__nativeId, boolean b);
/**
* See QCborStreamWriter:: append(const char*, qsizetype)
* @param str
* @param size
*/
@QtUninvokable
public final void append(byte[] str, int offsetOfStr, int size){
append_native_const_char_ptr_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), str, offsetOfStr, size);
}
@QtUninvokable
private native void append_native_const_char_ptr_qsizetype(long __this__nativeId, byte[] str, int offsetOfStr, int size);
/**
* See QCborStreamWriter:: append(double)
* @param d
*/
@QtUninvokable
public final void append(double d){
append_native_double(QtJambi_LibraryUtilities.internal.nativeId(this), d);
}
@QtUninvokable
private native void append_native_double(long __this__nativeId, double d);
/**
* See QCborStreamWriter:: append(float)
* @param f
*/
@QtUninvokable
public final void append(float f){
append_native_float(QtJambi_LibraryUtilities.internal.nativeId(this), f);
}
@QtUninvokable
private native void append_native_float(long __this__nativeId, float f);
/**
* See QCborStreamWriter:: append(int)
* @param i
*/
@QtUninvokable
public final void append(int i){
append_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), i);
}
@QtUninvokable
private native void append_native_int(long __this__nativeId, int i);
/**
* See QCborStreamWriter:: append(qint64)
* @param i
*/
@QtUninvokable
public final void append(long i){
append_native_qint64(QtJambi_LibraryUtilities.internal.nativeId(this), i);
}
@QtUninvokable
private native void append_native_qint64(long __this__nativeId, long i);
/**
* See QCborStreamWriter:: append(quint64)
* @param u
*/
@QtUninvokable
public final void append(java.math.@StrictNonNull @NonNull BigInteger u){
java.util.Objects.requireNonNull(u, "Argument 'u': null not expected.");
append_native_quint64(QtJambi_LibraryUtilities.internal.nativeId(this), u);
}
@QtUninvokable
private native void append_native_quint64(long __this__nativeId, java.math.BigInteger u);
/**
* See QCborStreamWriter:: appendByteString(const char*, qsizetype)
* @param data
*/
@QtUninvokable
public final void append(java.nio.@Nullable ByteBuffer data){
append_native_const_char_ptr_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), data);
}
@QtUninvokable
private native void append_native_const_char_ptr_qsizetype(long __this__nativeId, java.nio.ByteBuffer data);
/**
* See QCborStreamWriter:: appendNull()
*/
@QtUninvokable
public final void appendNull(){
appendNull_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void appendNull_native(long __this__nativeId);
/**
* See QCborStreamWriter:: appendUndefined()
*/
@QtUninvokable
public final void appendUndefined(){
appendUndefined_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void appendUndefined_native(long __this__nativeId);
/**
* See QCborStreamWriter:: device()const
* @return
*/
@QtUninvokable
public final io.qt.core.@Nullable QIODevice device(){
return device_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QIODevice device_native_constfct(long __this__nativeId);
/**
* See QCborStreamWriter:: endArray()
* @return
*/
@QtUninvokable
public final boolean endArray(){
return endArray_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean endArray_native(long __this__nativeId);
/**
* See QCborStreamWriter:: endMap()
* @return
*/
@QtUninvokable
public final boolean endMap(){
return endMap_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean endMap_native(long __this__nativeId);
/**
* See QCborStreamWriter:: setDevice(QIODevice*)
* @param device
*/
@QtUninvokable
public final void setDevice(io.qt.core.@Nullable QIODevice device){
InternalAccess.NativeIdInfo __device__NativeIdInfo = QtJambi_LibraryUtilities.internal.checkedNativeIdInfo(device);
setDevice_native_QIODevice_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), __device__NativeIdInfo.nativeId());
if (__device__NativeIdInfo.needsReferenceCounting()) {
__rcDevice = device;
}else{
__rcDevice = null;
}
}
@QtUninvokable
private native void setDevice_native_QIODevice_ptr(long __this__nativeId, long device);
/**
* See QCborStreamWriter:: startArray()
*/
@QtUninvokable
public final void startArray(){
startArray_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void startArray_native(long __this__nativeId);
/**
* See QCborStreamWriter:: startArray(quint64)
* @param count
*/
@QtUninvokable
public final void startArray(long count){
startArray_native_quint64(QtJambi_LibraryUtilities.internal.nativeId(this), count);
}
@QtUninvokable
private native void startArray_native_quint64(long __this__nativeId, long count);
/**
* See QCborStreamWriter:: startMap()
*/
@QtUninvokable
public final void startMap(){
startMap_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void startMap_native(long __this__nativeId);
/**
* See QCborStreamWriter:: startMap(quint64)
* @param count
*/
@QtUninvokable
public final void startMap(long count){
startMap_native_quint64(QtJambi_LibraryUtilities.internal.nativeId(this), count);
}
@QtUninvokable
private native void startMap_native_quint64(long __this__nativeId, long count);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QCborStreamWriter(QPrivateConstructor p) { super(p); }
/**
* Overloaded function for {@link #append(byte[], int, int)}.
*/
@QtUninvokable
public final void append(byte[] str) {
append(str, 0, -1);
}
}