uk.me.parabola.mkgmap.main
Class Main

java.lang.Object
  extended by uk.me.parabola.mkgmap.main.Main
All Implemented Interfaces:
ArgumentProcessor

public class Main
extends java.lang.Object
implements ArgumentProcessor

The new main program. There can be many file names to process and there can be differing outputs determined by options. So the actual work is mostly done in other classes. This one just works out what is wanted.

Author:
Steve Ratcliffe

Constructor Summary
Main()
           
 
Method Summary
 void endOptions(CommandArgs args)
          Called when all the command line options have been processed.
static void main(java.lang.String[] args)
          The main program to make or combine maps.
 void processFilename(CommandArgs args, java.lang.String filename)
          Switch out to the appropriate class to process the filename.
 void processOption(java.lang.String opt, java.lang.String val)
          Process an option.
 void startOptions()
          Called right at the beginning, before any command line options have been looked at.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main

public Main()
Method Detail

main

public static void main(java.lang.String[] args)
The main program to make or combine maps. We now use a two pass process, first going through the arguments and make any maps and collect names to be used for creating summary files like the TDB and gmapsupp.

Parameters:
args - The command line arguments.

startOptions

public void startOptions()
Description copied from interface: ArgumentProcessor
Called right at the beginning, before any command line options have been looked at.

Specified by:
startOptions in interface ArgumentProcessor

processFilename

public void processFilename(CommandArgs args,
                            java.lang.String filename)
Switch out to the appropriate class to process the filename.

Specified by:
processFilename in interface ArgumentProcessor
Parameters:
args - A copy of the option arguments in force when this filename was specified.
filename - The filename.

processOption

public void processOption(java.lang.String opt,
                          java.lang.String val)
Description copied from interface: ArgumentProcessor
Process an option. This is intended for options that change state or that say how the next filename is to be operated upon.

Specified by:
processOption in interface ArgumentProcessor
Parameters:
opt - The option name.
val - The option value.

endOptions

public void endOptions(CommandArgs args)
Description copied from interface: ArgumentProcessor
Called when all the command line options have been processed.

Specified by:
endOptions in interface ArgumentProcessor
Parameters:
args - The command line options.