io.qt.core.QNativeIpcKey Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.core;
import io.qt.*;
/**
* Holds a native key used by QSystemSemaphore and QSharedMemory
* Java wrapper for Qt class QNativeIpcKey
*/
public class QNativeIpcKey extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QNativeIpcKey.class);
/**
* Java wrapper for Qt enum QNativeIpcKey::Type
*/
public enum Type implements QtShortEnumerator {
/**
* Representing QNativeIpcKey:: Type:: SystemV
*/
SystemV((short)81),
/**
* Representing QNativeIpcKey:: Type:: PosixRealtime
*/
PosixRealtime((short)256),
/**
* Representing QNativeIpcKey:: Type:: Windows
*/
Windows((short)257);
static {
QtJambi_LibraryUtilities.initialize();
}
private Type(short value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public short value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull Type resolve(short value) {
switch (value) {
case 81: return SystemV;
case 256: return PosixRealtime;
case 257: return Windows;
default: throw new QNoSuchEnumValueException(value);
}
}
private final short value;
}
/**
* See QNativeIpcKey:: QNativeIpcKey()
*/
public QNativeIpcKey(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QNativeIpcKey instance);
/**
* See QNativeIpcKey:: QNativeIpcKey(QNativeIpcKey)
*/
public QNativeIpcKey(io.qt.core.@StrictNonNull QNativeIpcKey other){
super((QPrivateConstructor)null);
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
initialize_native(this, other);
}
private native static void initialize_native(QNativeIpcKey instance, io.qt.core.QNativeIpcKey other);
/**
* See QNativeIpcKey:: QNativeIpcKey(QNativeIpcKey::Type)
*/
public QNativeIpcKey(io.qt.core.QNativeIpcKey.@NonNull Type type){
super((QPrivateConstructor)null);
initialize_native(this, type);
}
private native static void initialize_native(QNativeIpcKey instance, io.qt.core.QNativeIpcKey.Type type);
/**
* See QNativeIpcKey:: QNativeIpcKey(QString, QNativeIpcKey::Type)
*/
public QNativeIpcKey(java.lang.@NonNull String k, io.qt.core.QNativeIpcKey.@NonNull Type type){
super((QPrivateConstructor)null);
initialize_native(this, k, type);
}
private native static void initialize_native(QNativeIpcKey instance, java.lang.String k, io.qt.core.QNativeIpcKey.Type type);
/**
* See QNativeIpcKey:: isEmpty()const
*/
@QtUninvokable
public final boolean isEmpty(){
return isEmpty_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isEmpty_native_constfct(long __this__nativeId);
/**
* See QNativeIpcKey:: isValid()const
*/
@QtUninvokable
public final boolean isValid(){
return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isValid_native_constfct(long __this__nativeId);
/**
* See QNativeIpcKey:: nativeKey()const
*/
@QtUninvokable
public final java.lang.@NonNull String nativeKey(){
return nativeKey_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String nativeKey_native_constfct(long __this__nativeId);
/**
* See QNativeIpcKey:: operator=(QNativeIpcKey)
*/
@QtUninvokable
public final void assign(io.qt.core.@StrictNonNull QNativeIpcKey other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
assign_native_cref_QNativeIpcKey(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QNativeIpcKey(long __this__nativeId, long other);
/**
* See operator==(QNativeIpcKey, QNativeIpcKey)
*/
@QtUninvokable
public final boolean equals(io.qt.core.@StrictNonNull QNativeIpcKey rhs){
java.util.Objects.requireNonNull(rhs, "Argument 'rhs': null not expected.");
return equals_native_cref_QNativeIpcKey(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs));
}
@QtUninvokable
private native boolean equals_native_cref_QNativeIpcKey(long __this__nativeId, long rhs);
/**
* See QNativeIpcKey:: setNativeKey(QString)
*/
@QtUninvokable
public final void setNativeKey(java.lang.@NonNull String newKey){
setNativeKey_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), newKey);
}
@QtUninvokable
private native void setNativeKey_native_cref_QString(long __this__nativeId, java.lang.String newKey);
/**
* See QNativeIpcKey:: setType(QNativeIpcKey::Type)
*/
@QtUninvokable
public final void setType(io.qt.core.QNativeIpcKey.@NonNull Type type){
setType_native_QNativeIpcKey_Type(QtJambi_LibraryUtilities.internal.nativeId(this), type.value());
}
@QtUninvokable
private native void setType_native_QNativeIpcKey_Type(long __this__nativeId, short type);
/**
* See QNativeIpcKey:: swap(QNativeIpcKey&)
*/
@QtUninvokable
public final void swap(io.qt.core.@StrictNonNull QNativeIpcKey other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
swap_native_ref_QNativeIpcKey(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void swap_native_ref_QNativeIpcKey(long __this__nativeId, long other);
/**
* See QNativeIpcKey:: toString()const
*/
@QtUninvokable
public final java.lang.@NonNull String toString(){
return toString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String toString_native_constfct(long __this__nativeId);
/**
* See QNativeIpcKey:: type()const
*/
@QtUninvokable
public final io.qt.core.QNativeIpcKey.@NonNull Type type(){
return io.qt.core.QNativeIpcKey.Type.resolve(type_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native short type_native_constfct(long __this__nativeId);
/**
* See QNativeIpcKey:: fromString(QString)
*/
public native static io.qt.core.@NonNull QNativeIpcKey fromString(java.lang.@NonNull String string);
/**
* See QNativeIpcKey:: legacyDefaultTypeForOs()
*/
public static io.qt.core.QNativeIpcKey.@NonNull Type legacyDefaultTypeForOs(){
return io.qt.core.QNativeIpcKey.Type.resolve(legacyDefaultTypeForOs_native());
}
private native static short legacyDefaultTypeForOs_native();
/**
* See QNativeIpcKey:: DefaultTypeForOs
*/
private static io.qt.core.QNativeIpcKey.@NonNull Type DefaultTypeForOs(){
return io.qt.core.QNativeIpcKey.Type.resolve(DefaultTypeForOs_native());
}
private native static short DefaultTypeForOs_native();
/**
* See QNativeIpcKey:: DefaultTypeForOs
*/
public static final io.qt.core.QNativeIpcKey.@NonNull Type DefaultTypeForOs = DefaultTypeForOs();
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QNativeIpcKey(QPrivateConstructor p) { super(p); }
/**
* See operator==(QNativeIpcKey, QNativeIpcKey)
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.core.QNativeIpcKey) {
return equals((io.qt.core.QNativeIpcKey) other);
}
return false;
}
/**
* Returns the objects's hash code computed by qHash(QNativeIpcKey)
.
*/
@QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native static int hashCode_native(long __this_nativeId);
/**
* Creates and returns a copy of this object.
See QNativeIpcKey:: QNativeIpcKey(QNativeIpcKey)
*/
@QtUninvokable
@Override
public QNativeIpcKey clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QNativeIpcKey clone_native(long __this_nativeId);
/**
* Overloaded constructor for {@link #QNativeIpcKey(java.lang.String, io.qt.core.QNativeIpcKey.Type)}
* with type = io.qt.core.QNativeIpcKey.DefaultTypeForOs
.
*/
public QNativeIpcKey(java.lang.@NonNull String k) {
this(k, io.qt.core.QNativeIpcKey.DefaultTypeForOs);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #DefaultTypeForOs()} instead.
*/
private static io.qt.core.QNativeIpcKey.@NonNull Type getDefaultTypeForOs() {
return DefaultTypeForOs();
}
}