Class Dm2Options

java.lang.Object
eu.bandm.tools.option.runtime.Model<Dm2Options>
eu.bandm.music.demoMetric.Dm2Options

public class Dm2Options extends Model<Dm2Options>
Generated source for command line processing.
The parallel GUI class is GuiDm2Options.
The normal way of operation is:
  1. Create a fresh instance by the only constructor Dm2Options().
  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:
 ======
 ----------------------------------------------------------
 Control batch operation for multiple metric split tests
 ----------------------------------------------------------
 -0 / --source         uri(="")
 Source file in "metric split batch file" format 
 --formats        format*(=EnumSet.of( format.lilyPond, format.pngTex))
 Set of generated output format 
 --lilypondCommand  string(="")
 Prefix of the ommand line to run lilyPond, the filename will be appended! 
 COND=formats_0
 
 format: 
 *         lilyPond  
 *           pngTex:     Generate a sequence of png graphics and one wrapping 
 LaTeX file 
 *          pngWord:     Generate a sequence of png graphics and one wrapping 
 WordML  file 
 *         musixTex  
 *         musicXml  
 
 
Created on 2024-09-03_21h40m52
by program bandm/metatools/option/compiler, version 2.1
command line =
java bandm/metatools/option/compiler Dm2Options.xml eu.bandm.music.demoMetric Dm2Options GuiDm2Options /mnt/c/Users/post/Documents/sig//src
  • Field Details

    • has_source

      protected boolean has_source
    • value_source_0

      protected String value_source_0
    • has_formats

      protected boolean has_formats
    • value_formats_0

      protected EnumSet<Dm2Options.format> value_formats_0
    • has_lilypondCommand

      protected boolean has_lilypondCommand
    • value_lilypondCommand_0

      protected String value_lilypondCommand_0
    • active_lilypondCommand

      protected boolean active_lilypondCommand
  • Constructor Details

    • Dm2Options

      public Dm2Options()
  • Method Details

    • makeDefaultInstance

      public Dm2Options 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<Dm2Options>
    • 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<Dm2Options>
    • has_source

      @Deprecated public boolean has_source()
      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_source_0().
    • get_source_0

      public String get_source_0()
      Getter method for the only argument of option source.
      This option indicates: Source file in "metric split batch file" format.

      The format of this option on the command line is
       
         -0 / --source         uri(="")
       
    • has_formats

      @Deprecated public boolean has_formats()
      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_formats_0().
    • get_formats_0

      public EnumSet<Dm2Options.format> get_formats_0()
      Getter method for the only argument of option formats.
      This option indicates: Set of generated output format.

      The format of this option on the command line is
       
              --formats        format*(=EnumSet.of( format.lilyPond, format.pngTex))
       
    • has_lilypondCommand

      @Deprecated public boolean has_lilypondCommand()
      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_lilypondCommand_0().
    • get_lilypondCommand_0

      public String get_lilypondCommand_0()
      Getter method for the only argument of option lilypondCommand.
      This option indicates: Prefix of the ommand line to run lilyPond, the filename will be appended!.

      The format of this option on the command line is
       
              --lilypondCommand  string(="")
       
    • 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<Dm2Options>
    • usage

      public void usage(PrintStream pr)
      Print usage information in the default language.
      Specified by:
      usage in class Model<Dm2Options>
    • 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<Dm2Options>
    • 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<Dm2Options>
      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<Dm2Options>
      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<Dm2Options>
    • 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<Dm2Options>
    • _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<Dm2Options>
    • _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<Dm2Options>
    • _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<Dm2Options>