Package eu.bandm.music.top
Class MlwOptions
Generated source for command line processing.
(A parallel GUI class has not been generated. The normal way of operation is:
As default language the English language has been chosen, because it is lingua franca of computer science.
(A parallel GUI class has not been generated. The normal way of operation is:
- Create a fresh instance by the only constructor
MlwOptions()
. - Analyse command line by invoking
Model.parse(String[],MessageReceiver,String)
- Inquire whether a particular
option X has been set on the commandline
by invoking
has_[X]()
. - The arguments of each option are
determined by a sequence of types: first a leading sequence,
values for which appear exactly once, followed by a sequence
which may be repeated. Both type sequences may be empty.
Inquire value of the options n-th argument in the fixed, leading argument sequence byget_[X]_[n]()
. - Inquire value of the
options n-th argument in the k-th repetition group by
get_[X]_[n](k)
.
If anything went wrong in parsing, errors
have been sent to the MessageReceiver
.
Then further analysis methods can be applied (Model.getParsingProtocol()
, Model.getMissingOptions()
, Model.usage()
, etc.)
For further details. please see the
documentation of the methods inherited from the superclass Model
and the option
compiler's user documentation.
Here is the source text.
Internationalization
The documentation texts in the option definition file are multi-lingual. There are entries in the languages de and en.As default language the English language has been chosen, because it is lingua franca of computer science.
The usage()
method will show this screen:
====== USAGE: ====== -0 / --inputfile uri(="") text file in tscore format to process -1 / --outputfile uri(="") uri(="") uri(="") output text file templates for TeX/musixTeX sources, scale format, then fifths format, then survey table
Created on 2024-09-03_21h40m41
by program bandm/metatools/option/compiler, version 2.1
command line =
java bandm/metatools/option/compiler MlwOptions.xml eu.bandm.music.top MlwOptions /mnt/c/Users/post/Documents/sig//src
by program bandm/metatools/option/compiler, version 2.1
command line =
java bandm/metatools/option/compiler MlwOptions.xml eu.bandm.music.top MlwOptions /mnt/c/Users/post/Documents/sig//src
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Programmatically generated catalog of translations.Nested classes/interfaces inherited from class eu.bandm.tools.option.runtime.Model
Model.ExcDuplicate, Model.ExcEndOfRepet, Model.ExcNoData, Model.ExcNoData_allowed, Model.ExcSkipReachesEnd, Model.ExcUnknownOpt, Model.ExcWrongType, Model.Pre20220613, Model.SeemsToWorkForLinuxAndSomeWindowsVersions20220613
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected String
protected String
protected String
protected String
Fields inherited from class eu.bandm.tools.option.runtime.Model
curArg, curArgGroup, curOption, currentErrorPos, descriptions, dummyRat, GNU_VERSION_OPTION, hasNonMetaOptions, inputlength, inputstring, matcher, messages, msg, nextToken, optionDirector, p_rest, positionalPhase, positionalsExplicit, positionalsFound, protocol, shellAdapter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Callback, overridden by compiled code.Is overridden in the generated code and concatenates the "longest names" of all otions marked as required, but not present in the parsed input.Callback, overridden by compiled code.protected void
The generated code will evaluate all conditions to activate/deactive options in the GUI.Getter method for the only argument of optioninputfile
.Getter method for the 0th argument of optionoutputfile
.Getter method for the 1st argument of optionoutputfile
.Getter method for the 2nd argument of optionoutputfile
.boolean
Deprecated.boolean
Deprecated.Overriden by the generated code to make a constructor call of the actual Model (sub-)class.protected int
The generated code will return the number of positional parameters.protected void
parseAbbrev
(String select) Callback, overridden by compiled code, which realizes a switch over all one character option names.protected void
Callback, overridden by compiled code, which realizes a switch over all long option names.protected void
Callback, overridden by compiled code, which calls one after the other the positional parameters.Called to generate a String representation of the model's state.void
usage
(PrintStream pr) Print usage information in the default language.void
usage
(PrintStream pr, String lang) Print usage information in the requested language.void
usage_de()
Print usage information in the language 'de' on System.err.void
usage_de
(PrintStream pr) Print usage information in the language 'de'.void
usage_en()
Print usage information in the language 'en' on System.err.void
usage_en
(PrintStream pr) Print usage information in the language 'en'.Methods inherited from class eu.bandm.tools.option.runtime.Model
ARG_ERROR, ARG_ERROR, canReenterRepetitionGroup, convert_integer_10_or_16, descriptionKeyForCommentField, descriptionKeyForEnum, descriptionKeyForEnum, descriptionKeyForEnumItem, ERROR, ERROR_plus, ERROR_UNKNOWN_ABBREV, ERROR_UNKNOWN_NAME, getInputString, getMissingOptions, getNextToken, getNextToken_required, getParsingProtocol, HINT, INSITU, parse, parseBool, parseBool_optional, parseBoolTest, parseEnum, parseEnumSet, parseFloat, parseInit, parseInt, parseInt_16or10, parseOneString, parseOneString, parseOneString, parseOneUri, parseRational, parseString, putprot, putprot_option, serialize, serialize, serialize, serialize, serialize, serialize, serialize, serialize, serialize_hex, skipToOption, type_error, TYPE_MISMATCH, TYPE_MISMATCH, usage, usage, WARNING
-
Field Details
-
has_inputfile
protected boolean has_inputfile -
value_inputfile_0
-
has_outputfile
protected boolean has_outputfile -
value_outputfile_0
-
value_outputfile_1
-
value_outputfile_2
-
-
Constructor Details
-
MlwOptions
public MlwOptions()
-
-
Method Details
-
makeDefaultInstance
Description copied from class:eu.bandm.tools.option.runtime.Model
Overriden by the generated code to make a constructor call of the actual Model (sub-)class.- Specified by:
makeDefaultInstance
in classModel<MlwOptions>
-
checkActive
protected void checkActive()Description copied from class:eu.bandm.tools.option.runtime.Model
The generated code will evaluate all conditions to activate/deactive options in the GUI.- Specified by:
checkActive
in classModel<MlwOptions>
-
has_inputfile
Deprecated.- Returns:
- whether the option has been set on the command line.
(The result is of no significance when using GUI input, and should neither be used in command line mode.)
For details of this option see the method
get_inputfile_0()
.
-
get_inputfile_0
Getter method for the only argument of optioninputfile
.This option indicates: text file in tscore format to process.
The format of this option on the command line is-0 / --inputfile uri(="")
-
has_outputfile
Deprecated.- Returns:
- whether the option has been set on the command line.
(The result is of no significance when using GUI input, and should neither be used in command line mode.)
For details of this option see the method
get_outputfile_0()
.
-
get_outputfile_0
Getter method for the 0th argument of optionoutputfile
.This option indicates: output text file templates for TeX/musixTeX sources, scale format, then fifths format, then survey table.
The format of this option on the command line is-1 / --outputfile uri(="") uri(="") uri(="")
The other arguments of this option are accessed by the method(s) starting withget_outputfile..
. -
get_outputfile_1
Getter method for the 1st argument of optionoutputfile
. For details of this option see the methodget_outputfile_0()
. -
get_outputfile_2
Getter method for the 2nd argument of optionoutputfile
. For details of this option see the methodget_outputfile_0()
. -
serialize
Description copied from class:eu.bandm.tools.option.runtime.Model
Called to generate a String representation of the model's state. Code is overridden by the compiled code.- Specified by:
serialize
in classModel<MlwOptions>
-
usage
Print usage information in the default language.- Specified by:
usage
in classModel<MlwOptions>
-
usage
Print usage information in the requested language. Falls back to default language, if that language is not supported.- Specified by:
usage
in classModel<MlwOptions>
-
usage_de
public void usage_de()Print usage information in the language 'de' on System.err. -
usage_de
Print usage information in the language 'de'. -
usage_en
public void usage_en()Print usage information in the language 'en' on System.err. -
usage_en
Print usage information in the language 'en'. -
parseAbbrev
Description copied from class:eu.bandm.tools.option.runtime.Model
Callback, overridden by compiled code, which realizes a switch over all one character option names. The generated code calls the argument parsers and stores the resulting values to the model's fields.- Specified by:
parseAbbrev
in classModel<MlwOptions>
- Parameters:
select
- the one-character option name, as parsed by this code.
-
parseName
Description copied from class:eu.bandm.tools.option.runtime.Model
Callback, overridden by compiled code, which realizes a switch over all long option names. The generated code calls the argument parsers and stores the resulting values to the model's fields.- Specified by:
parseName
in classModel<MlwOptions>
- Parameters:
select
- the multi-character option name, as parsed by this code.
-
numberOfPositionals
protected int numberOfPositionals()Description copied from class:eu.bandm.tools.option.runtime.Model
The generated code will return the number of positional parameters.- Specified by:
numberOfPositionals
in classModel<MlwOptions>
-
parsePositionals
protected void parsePositionals()Description copied from class:eu.bandm.tools.option.runtime.Model
Callback, overridden by compiled code, which calls one after the other the positional parameters. Each of them corresponds to an implicit option (with short names "-0 ", "-1 ", "-2 ", ...). These can also be defined explicitly, e.g. be given a long name, etc. Anyhow, they can be set explicitly by their short name. If one single positional option is given explicitly, the implicit parsing of the others is suppressed and this code will not be called.- Specified by:
parsePositionals
in classModel<MlwOptions>
-
_finalCheck
protected void _finalCheck()Description copied from class:eu.bandm.tools.option.runtime.Model
Callback, overridden by compiled code.- Specified by:
_finalCheck
in classModel<MlwOptions>
-
_getMissingOptions
Description copied from class:eu.bandm.tools.option.runtime.Model
Is overridden in the generated code and concatenates the "longest names" of all otions marked as required, but not present in the parsed input. Length==0 iff none is missing. Cf "sourcedtd required='yes'" in tools/tdom_withOptions/Options.xml- Specified by:
_getMissingOptions
in classModel<MlwOptions>
-
_getRedundantOptions
Description copied from class:eu.bandm.tools.option.runtime.Model
Callback, overridden by compiled code.- Specified by:
_getRedundantOptions
in classModel<MlwOptions>
-