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

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

There is a newer version: 6.8.0
Show newest version
package io.qt.core;

import io.qt.*;


/**
 * 

Means for handling the command line options

*

Java wrapper for Qt class QCommandLineParser

*/ public class QCommandLineParser extends QtObject { static { QtJambi_LibraryUtilities.initialize(); } /** *

Java wrapper for Qt enum QCommandLineParser::OptionsAfterPositionalArgumentsMode

*/ public enum OptionsAfterPositionalArgumentsMode implements QtEnumerator { /** *

Representing QCommandLineParser::ParseAsOptions

*/ ParseAsOptions(0), /** *

Representing QCommandLineParser::ParseAsPositionalArguments

*/ ParseAsPositionalArguments(1); static { QtJambi_LibraryUtilities.initialize(); } private OptionsAfterPositionalArgumentsMode(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 @NonNull OptionsAfterPositionalArgumentsMode resolve(int value) { switch (value) { case 0: return ParseAsOptions; case 1: return ParseAsPositionalArguments; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QCommandLineParser::SingleDashWordOptionMode

*/ public enum SingleDashWordOptionMode implements QtEnumerator { /** *

Representing QCommandLineParser::ParseAsCompactedShortOptions

*/ ParseAsCompactedShortOptions(0), /** *

Representing QCommandLineParser::ParseAsLongOptions

*/ ParseAsLongOptions(1); static { QtJambi_LibraryUtilities.initialize(); } private SingleDashWordOptionMode(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 @NonNull SingleDashWordOptionMode resolve(int value) { switch (value) { case 0: return ParseAsCompactedShortOptions; case 1: return ParseAsLongOptions; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QCommandLineParser::QCommandLineParser()

*/ public QCommandLineParser(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QCommandLineParser instance); /** *

See QCommandLineParser::addHelpOption()

*/ @QtUninvokable public final io.qt.core.@NonNull QCommandLineOption addHelpOption(){ return addHelpOption_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QCommandLineOption addHelpOption_native(long __this__nativeId); /** *

See QCommandLineParser::addOption(QCommandLineOption)

*/ @QtUninvokable public final boolean addOption(io.qt.core.@NonNull QCommandLineOption commandLineOption){ return addOption_native_cref_QCommandLineOption(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(commandLineOption)); } @QtUninvokable private native boolean addOption_native_cref_QCommandLineOption(long __this__nativeId, long commandLineOption); /** *

See QCommandLineParser::addOptions(QList<QCommandLineOption>)

*/ @QtUninvokable public final boolean addOptions(java.util.@NonNull Collection options){ return addOptions_native_cref_QList(QtJambi_LibraryUtilities.internal.nativeId(this), options); } @QtUninvokable private native boolean addOptions_native_cref_QList(long __this__nativeId, java.util.Collection options); /** *

See QCommandLineParser::addPositionalArgument(QString,QString,QString)

*/ @QtUninvokable public final void addPositionalArgument(java.lang.@NonNull String name, java.lang.@NonNull String description, java.lang.@NonNull String syntax){ addPositionalArgument_native_cref_QString_cref_QString_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), name, description, syntax); } @QtUninvokable private native void addPositionalArgument_native_cref_QString_cref_QString_cref_QString(long __this__nativeId, java.lang.String name, java.lang.String description, java.lang.String syntax); /** *

See QCommandLineParser::addVersionOption()

*/ @QtUninvokable public final io.qt.core.@NonNull QCommandLineOption addVersionOption(){ return addVersionOption_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QCommandLineOption addVersionOption_native(long __this__nativeId); /** *

See QCommandLineParser::applicationDescription()const

*/ @QtUninvokable public final java.lang.@NonNull String applicationDescription(){ return applicationDescription_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.lang.String applicationDescription_native_constfct(long __this__nativeId); /** *

See QCommandLineParser::clearPositionalArguments()

*/ @QtUninvokable public final void clearPositionalArguments(){ clearPositionalArguments_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native void clearPositionalArguments_native(long __this__nativeId); /** *

See QCommandLineParser::errorText()const

*/ @QtUninvokable public final java.lang.@NonNull String errorText(){ return errorText_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.lang.String errorText_native_constfct(long __this__nativeId); /** *

See QCommandLineParser::helpText()const

*/ @QtUninvokable public final java.lang.@NonNull String helpText(){ return helpText_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.lang.String helpText_native_constfct(long __this__nativeId); /** *

See QCommandLineParser::isSet(QCommandLineOption)const

*/ @QtUninvokable public final boolean isSet(io.qt.core.@NonNull QCommandLineOption option){ return isSet_native_cref_QCommandLineOption_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(option)); } @QtUninvokable private native boolean isSet_native_cref_QCommandLineOption_constfct(long __this__nativeId, long option); /** *

See QCommandLineParser::isSet(QString)const

*/ @QtUninvokable public final boolean isSet(java.lang.@NonNull String name){ return isSet_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), name); } @QtUninvokable private native boolean isSet_native_cref_QString_constfct(long __this__nativeId, java.lang.String name); /** *

See QCommandLineParser::optionNames()const

*/ @QtUninvokable public final io.qt.core.@NonNull QStringList optionNames(){ return optionNames_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QStringList optionNames_native_constfct(long __this__nativeId); /** *

See QCommandLineParser::parse(QStringList)

*/ @QtUninvokable public final boolean parse(java.util.@NonNull Collection arguments){ return parse_native_cref_QStringList(QtJambi_LibraryUtilities.internal.nativeId(this), arguments); } @QtUninvokable private native boolean parse_native_cref_QStringList(long __this__nativeId, java.util.Collection arguments); /** *

See QCommandLineParser::positionalArguments()const

*/ @QtUninvokable public final io.qt.core.@NonNull QStringList positionalArguments(){ return positionalArguments_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QStringList positionalArguments_native_constfct(long __this__nativeId); /** *

See QCommandLineParser::process(QCoreApplication)

*/ @QtUninvokable public final void process(io.qt.core.@StrictNonNull QCoreApplication app){ java.util.Objects.requireNonNull(app, "Argument 'app': null not expected."); process_native_cref_QCoreApplication(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(app)); } @QtUninvokable private native void process_native_cref_QCoreApplication(long __this__nativeId, long app); /** *

See QCommandLineParser::process(QStringList)

*/ @QtUninvokable public final void process(java.util.@NonNull Collection arguments){ process_native_cref_QStringList(QtJambi_LibraryUtilities.internal.nativeId(this), arguments); } @QtUninvokable private native void process_native_cref_QStringList(long __this__nativeId, java.util.Collection arguments); /** *

See QCommandLineParser::setApplicationDescription(QString)

*/ @QtUninvokable public final void setApplicationDescription(java.lang.@NonNull String description){ setApplicationDescription_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), description); } @QtUninvokable private native void setApplicationDescription_native_cref_QString(long __this__nativeId, java.lang.String description); /** *

See QCommandLineParser::setOptionsAfterPositionalArgumentsMode(QCommandLineParser::OptionsAfterPositionalArgumentsMode)

*/ @QtUninvokable public final void setOptionsAfterPositionalArgumentsMode(io.qt.core.QCommandLineParser.@NonNull OptionsAfterPositionalArgumentsMode mode){ setOptionsAfterPositionalArgumentsMode_native_QCommandLineParser_OptionsAfterPositionalArgumentsMode(QtJambi_LibraryUtilities.internal.nativeId(this), mode.value()); } @QtUninvokable private native void setOptionsAfterPositionalArgumentsMode_native_QCommandLineParser_OptionsAfterPositionalArgumentsMode(long __this__nativeId, int mode); /** *

See QCommandLineParser::setSingleDashWordOptionMode(QCommandLineParser::SingleDashWordOptionMode)

*/ @QtUninvokable public final void setSingleDashWordOptionMode(io.qt.core.QCommandLineParser.@NonNull SingleDashWordOptionMode parsingMode){ setSingleDashWordOptionMode_native_QCommandLineParser_SingleDashWordOptionMode(QtJambi_LibraryUtilities.internal.nativeId(this), parsingMode.value()); } @QtUninvokable private native void setSingleDashWordOptionMode_native_QCommandLineParser_SingleDashWordOptionMode(long __this__nativeId, int parsingMode); /** *

See QCommandLineParser::showHelp(int)

*/ @QtUninvokable public final void showHelp(int exitCode){ showHelp_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), exitCode); } @QtUninvokable private native void showHelp_native_int(long __this__nativeId, int exitCode); /** *

See QCommandLineParser::showVersion()

*/ @QtUninvokable public final void showVersion(){ showVersion_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native void showVersion_native(long __this__nativeId); /** *

See QCommandLineParser::unknownOptionNames()const

*/ @QtUninvokable public final io.qt.core.@NonNull QStringList unknownOptionNames(){ return unknownOptionNames_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QStringList unknownOptionNames_native_constfct(long __this__nativeId); /** *

See QCommandLineParser::value(QCommandLineOption)const

*/ @QtUninvokable public final java.lang.@NonNull String value(io.qt.core.@NonNull QCommandLineOption option){ return value_native_cref_QCommandLineOption_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(option)); } @QtUninvokable private native java.lang.String value_native_cref_QCommandLineOption_constfct(long __this__nativeId, long option); /** *

See QCommandLineParser::value(QString)const

*/ @QtUninvokable public final java.lang.@NonNull String value(java.lang.@NonNull String name){ return value_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), name); } @QtUninvokable private native java.lang.String value_native_cref_QString_constfct(long __this__nativeId, java.lang.String name); /** *

See QCommandLineParser::values(QCommandLineOption)const

*/ @QtUninvokable public final io.qt.core.@NonNull QStringList values(io.qt.core.@NonNull QCommandLineOption option){ return values_native_cref_QCommandLineOption_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(option)); } @QtUninvokable private native io.qt.core.QStringList values_native_cref_QCommandLineOption_constfct(long __this__nativeId, long option); /** *

See QCommandLineParser::values(QString)const

*/ @QtUninvokable public final io.qt.core.@NonNull QStringList values(java.lang.@NonNull String name){ return values_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), name); } @QtUninvokable private native io.qt.core.QStringList values_native_cref_QString_constfct(long __this__nativeId, java.lang.String name); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QCommandLineParser(QPrivateConstructor p) { super(p); } /** *

Overloaded function for {@link #addPositionalArgument(java.lang.String, java.lang.String, java.lang.String)} * with syntax = (String)null.

*/ @QtUninvokable public final void addPositionalArgument(java.lang.@NonNull String name, java.lang.@NonNull String description) { addPositionalArgument(name, description, (String)null); } /** *

Overloaded function for {@link #showHelp(int)} * with exitCode = 0.

*/ @QtUninvokable public final void showHelp() { showHelp((int)0); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy