All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.core.QSemaphore Maven / Gradle / Ivy

The newest version!
package io.qt.core;


/**
 * 

General counting semaphore

*

Java wrapper for Qt class QSemaphore

*/ public class QSemaphore extends io.qt.QtObject { static { QtJambi_LibraryUtilities.initialize(); } /** *

Overloaded constructor for {@link #QSemaphore(int)} * with n = 0.

*/ public QSemaphore() { this((int)0); } /** *

See QSemaphore::QSemaphore(int)

*/ public QSemaphore(int n){ super((QPrivateConstructor)null); initialize_native(this, n); } private native static void initialize_native(QSemaphore instance, int n); /** *

Overloaded function for {@link #acquire(int)} * with n = 1.

*/ @io.qt.QtUninvokable public final void acquire() { acquire((int)1); } /** *

See QSemaphore::acquire(int)

*/ @io.qt.QtUninvokable public final void acquire(int n){ acquire_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), n); } @io.qt.QtUninvokable private native void acquire_native_int(long __this__nativeId, int n); /** *

See QSemaphore::available()const

*/ @io.qt.QtUninvokable public final int available(){ return available_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native int available_native_constfct(long __this__nativeId); /** *

Overloaded function for {@link #release(int)} * with n = 1.

*/ @io.qt.QtUninvokable public final void release() { release((int)1); } /** *

See QSemaphore::release(int)

*/ @io.qt.QtUninvokable public final void release(int n){ release_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), n); } @io.qt.QtUninvokable private native void release_native_int(long __this__nativeId, int n); /** *

Overloaded function for {@link #tryAcquire(int)} * with n = 1.

*/ @io.qt.QtUninvokable public final boolean tryAcquire() { return tryAcquire((int)1); } /** *

See QSemaphore::tryAcquire(int)

*/ @io.qt.QtUninvokable public final boolean tryAcquire(int n){ return tryAcquire_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), n); } @io.qt.QtUninvokable private native boolean tryAcquire_native_int(long __this__nativeId, int n); /** *

See QSemaphore::tryAcquire(int,int)

*/ @io.qt.QtUninvokable public final boolean tryAcquire(int n, int timeout){ return tryAcquire_native_int_int(QtJambi_LibraryUtilities.internal.nativeId(this), n, timeout); } @io.qt.QtUninvokable private native boolean tryAcquire_native_int_int(long __this__nativeId, int n, int timeout); /** *

See QSemaphore::try_acquire()

*/ @io.qt.QtUninvokable public final boolean try_acquire(){ return try_acquire_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native boolean try_acquire_native(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QSemaphore(QPrivateConstructor p) { super(p); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy