Class MfOptions


public class MfOptions extends Model<MfOptions>
Generated source for command line processing.
The parallel GUI class is MfGui.
The normal way of operation is:
  1. Create a fresh instance by the only constructor MfOptions().
  2. Analyse command line by invoking Model.parse(String[],MessageReceiver,String)
  3. Inquire whether a particular option X has been set on the commandline by invoking has_[X]().
  4. 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 by get_[X]_[n]().
  5. 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:
 ======
 -v / --version        (bool)?(=true iff present)
 show version number
 -d / --debuglevel     int(=0)
 0-100 for minimal to maximal debug verbosity
 -0 / --inputfile      uri(="")
 text file in tscore format to process
 -1 / --outputfile     uri(="")
 output text file in svg format
 -u / --userCoords     int(=20) int(=20) int(=70) int(=70)
 sequence of four integer numbers as user coordinate limis. First lower x and 
    lower y, than upper x and upper y. The lower values will be mapped to the 
    physical output coordinate zero(0). The higher will be mapped to the 
    coordinates given by the option --physCoords. Please note that in physical
    coordinates (aka device coordinates) the y axis grows downwards.
 -p / --physCoords     int(=800) int(=800) physUnit(=px)
 sequence of two integer numbers, x width and y height of the physical output,
    and the unit in which they are measured. The coordinates start at the 
    upper left corner of the output area with zero comma zero (0,0). 
 --timeFactor     float(=1.0)
 factor for multiplying the duration values. Iff this is 1.0, then the numeric
    values give real-time seconds.
 -i / --interactive    (bool)?(=true iff present)
 flag whether to open the gui to edit parameters
 
 enumeration physUnit  = (px | pt | pc | mm | cm | in | em | ex)
 
 
Created on 2024-09-03_21h40m39
by program bandm/metatools/option/compiler, version 2.1
command line =
java bandm/metatools/option/compiler MfOptions.xml eu.bandm.music.top MfOptions MfGui /mnt/c/Users/post/Documents/sig//src
  • Field Details

    • has_version

      protected boolean has_version
    • value_version_0

      protected boolean value_version_0
    • has_debuglevel

      protected boolean has_debuglevel
    • value_debuglevel_0

      protected int value_debuglevel_0
    • has_inputfile

      protected boolean has_inputfile
    • value_inputfile_0

      protected String value_inputfile_0
    • has_outputfile

      protected boolean has_outputfile
    • value_outputfile_0

      protected String value_outputfile_0
    • has_userCoords

      protected boolean has_userCoords
    • value_userCoords_0

      protected int value_userCoords_0
    • value_userCoords_1

      protected int value_userCoords_1
    • value_userCoords_2

      protected int value_userCoords_2
    • value_userCoords_3

      protected int value_userCoords_3
    • has_physCoords

      protected boolean has_physCoords
    • value_physCoords_0

      protected int value_physCoords_0
    • value_physCoords_1

      protected int value_physCoords_1
    • value_physCoords_2

      protected MfOptions.physUnit value_physCoords_2
    • has_timeFactor

      protected boolean has_timeFactor
    • value_timeFactor_0

      protected double value_timeFactor_0
    • has_interactive

      protected boolean has_interactive
    • value_interactive_0

      protected boolean value_interactive_0
  • Constructor Details

    • MfOptions

      public MfOptions()
  • Method Details

    • makeDefaultInstance

      public MfOptions 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 class Model<MfOptions>
    • 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 class Model<MfOptions>
    • has_version

      @Deprecated public boolean has_version()
      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_version_0().
    • get_version_0

      public boolean get_version_0()
      Getter method for the 0th argument of option version.
      This option indicates: show version number.

      The format of this option on the command line is
       
         -v / --version        (bool)?(=true iff present)
       
    • has_debuglevel

      @Deprecated public boolean has_debuglevel()
      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_debuglevel_0().
    • get_debuglevel_0

      public int get_debuglevel_0()
      Getter method for the only argument of option debuglevel.
      This option indicates: 0-100 for minimal to maximal debug verbosity.

      The format of this option on the command line is
       
         -d / --debuglevel     int(=0)
       
    • has_inputfile

      @Deprecated public boolean 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

      public String get_inputfile_0()
      Getter method for the only argument of option inputfile.
      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 public boolean 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

      public String get_outputfile_0()
      Getter method for the only argument of option outputfile.
      This option indicates: output text file in svg format.

      The format of this option on the command line is
       
         -1 / --outputfile     uri(="")
       
    • has_userCoords

      @Deprecated public boolean has_userCoords()
      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_userCoords_0().
    • get_userCoords_0

      public int get_userCoords_0()
      Getter method for the 0th argument of option userCoords.
      This option indicates: sequence of four integer numbers as user coordinate limis. First lower x and lower y, than upper x and upper y. The lower values will be mapped to the physical output coordinate zero(0). The higher will be mapped to the coordinates given by the option --physCoords. Please note that in physical coordinates (aka device coordinates) the y axis grows downwards.

      The format of this option on the command line is
       
         -u / --userCoords     int(=20) int(=20) int(=70) int(=70)
       
      The other arguments of this option are accessed by the method(s) starting with get_userCoords...
    • get_userCoords_1

      public int get_userCoords_1()
      Getter method for the 1st argument of option userCoords. For details of this option see the method get_userCoords_0().
    • get_userCoords_2

      public int get_userCoords_2()
      Getter method for the 2nd argument of option userCoords. For details of this option see the method get_userCoords_0().
    • get_userCoords_3

      public int get_userCoords_3()
      Getter method for the 3rd argument of option userCoords. For details of this option see the method get_userCoords_0().
    • has_physCoords

      @Deprecated public boolean has_physCoords()
      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_physCoords_0().
    • get_physCoords_0

      public int get_physCoords_0()
      Getter method for the 0th argument of option physCoords.
      This option indicates: sequence of two integer numbers, x width and y height of the physical output, and the unit in which they are measured. The coordinates start at the upper left corner of the output area with zero comma zero (0,0).

      The format of this option on the command line is
       
         -p / --physCoords     int(=800) int(=800) physUnit(=px)
       
      The other arguments of this option are accessed by the method(s) starting with get_physCoords...
    • get_physCoords_1

      public int get_physCoords_1()
      Getter method for the 1st argument of option physCoords. For details of this option see the method get_physCoords_0().
    • get_physCoords_2

      public MfOptions.physUnit get_physCoords_2()
      Getter method for the 2nd argument of option physCoords. For details of this option see the method get_physCoords_0().
    • has_timeFactor

      @Deprecated public boolean has_timeFactor()
      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_timeFactor_0().
    • get_timeFactor_0

      public double get_timeFactor_0()
      Getter method for the only argument of option timeFactor.
      This option indicates: factor for multiplying the duration values. Iff this is 1.0, then the numeric values give real-time seconds.

      The format of this option on the command line is
       
              --timeFactor     float(=1.0)
       
    • has_interactive

      @Deprecated public boolean has_interactive()
      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_interactive_0().
    • get_interactive_0

      public boolean get_interactive_0()
      Getter method for the only argument of option interactive.
      This option indicates: flag whether to open the gui to edit parameters.

      The format of this option on the command line is
       
         -i / --interactive    (bool)?(=true iff present)
       
    • serialize

      public String 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 class Model<MfOptions>
    • usage

      public void usage(PrintStream pr)
      Print usage information in the default language.
      Specified by:
      usage in class Model<MfOptions>
    • usage

      public void usage(PrintStream pr, String lang)
      Print usage information in the requested language. Falls back to default language, if that language is not supported.
      Specified by:
      usage in class Model<MfOptions>
    • usage_de

      public void usage_de()
      Print usage information in the language 'de' on System.err.
    • usage_de

      public void usage_de(PrintStream pr)
      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

      public void usage_en(PrintStream pr)
      Print usage information in the language 'en'.
    • parseAbbrev

      protected void parseAbbrev(String select)
      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 class Model<MfOptions>
      Parameters:
      select - the one-character option name, as parsed by this code.
    • parseName

      protected void parseName(String select)
      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 class Model<MfOptions>
      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 class Model<MfOptions>
    • 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 class Model<MfOptions>
    • _finalCheck

      protected void _finalCheck()
      Description copied from class: eu.bandm.tools.option.runtime.Model
      Callback, overridden by compiled code.
      Specified by:
      _finalCheck in class Model<MfOptions>
    • _getMissingOptions

      public String _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 class Model<MfOptions>
    • _getRedundantOptions

      public String _getRedundantOptions()
      Description copied from class: eu.bandm.tools.option.runtime.Model
      Callback, overridden by compiled code.
      Specified by:
      _getRedundantOptions in class Model<MfOptions>