예제 #1
0
        static ArgsParser.ArgsParser SetArgsParser(string [] args)
        {
            argsParser = new ArgsParser.ArgsParser(args);
            argsParser.AddAllowedOption(RecoverSugiyamaTestOption);
            argsParser.AddAllowedOption(QuietOption);
            argsParser.AddAllowedOption(BundlingOption);
            argsParser.AddOptionWithAfterStringWithHelp(FileOption, "the name of the input file");
            argsParser.AddOptionWithAfterStringWithHelp(ListOfFilesOption,
                                                        "the name of the file containing a list of files");
            argsParser.AddAllowedOptionWithHelpString(TestCdtOption, "testing Constrained Delaunay Triangulation");
            argsParser.AddAllowedOptionWithHelpString(TestCdtOption0,
                                                      "testing Constrained Delaunay Triangulation on a small graph");
            argsParser.AddAllowedOptionWithHelpString(TestCdtOption1, "testing threading through a CDT");
            argsParser.AddAllowedOptionWithHelpString(TestCdtOption2,
                                                      "testing Constrained Delaunay Triangulation on file \'polys\'");
            argsParser.AddAllowedOptionWithHelpString(ReverseXOption, "reversing X coordinate");
            argsParser.AddOptionWithAfterStringWithHelp(EdgeSeparationOption, "use specified edge separation");
            argsParser.AddAllowedOptionWithHelpString(MdsOption, "use mds layout");
            argsParser.AddAllowedOptionWithHelpString(FdOption, "use force directed layout");
            argsParser.AddAllowedOptionWithHelpString(ConstraintsTestOption, "test constraints");
            argsParser.AddOptionWithAfterStringWithHelp(InkImportanceOption, "ink importance coefficient");
            argsParser.AddOptionWithAfterStringWithHelp(TightPaddingOption, "tight padding coefficient");
            argsParser.AddOptionWithAfterStringWithHelp(LoosePaddingOption, "loose padding coefficient");
            argsParser.AddOptionWithAfterStringWithHelp(CapacityCoeffOption, "capacity coeffiecient");
            argsParser.AddAllowedOptionWithHelpString(PolygonDistanceTestOption, "test Polygon.Distance");
            argsParser.AddAllowedOptionWithHelpString(PolygonDistanceTestOption3, "test PolygonDistance3");
            argsParser.AddAllowedOptionWithHelpString(RandomBundlingTest, "random bundling test");
            argsParser.AddAllowedOptionWithHelpString(TestCdtThreaderOption, "test CdtThreader");
            argsParser.AddAllowedOptionWithHelpString(AsyncLayoutOption, "test viewer in the async mode");

            if (!argsParser.Parse())
            {
                Console.WriteLine(argsParser.UsageString());
                Environment.Exit(1);
            }
            return(argsParser);
        }
예제 #2
0
        static ArgsParser.ArgsParser SetArgsParser(string [] args)
        {
            argsParser = new ArgsParser.ArgsParser(args);
            argsParser.AddAllowedOption(RecoverSugiyamaTestOption);
            argsParser.AddAllowedOption(QuietOption);
            argsParser.AddAllowedOption(BundlingOption);
            argsParser.AddOptionWithAfterStringWithHelp(FileOption,"the name of the input file");
            argsParser.AddOptionWithAfterStringWithHelp(ListOfFilesOption,
                                                        "the name of the file containing a list of files");
            argsParser.AddAllowedOptionWithHelpString(TestCdtOption,"testing Constrained Delaunay Triangulation");
            argsParser.AddAllowedOptionWithHelpString(TestCdtOption0,
                                                      "testing Constrained Delaunay Triangulation on a small graph");
            argsParser.AddAllowedOptionWithHelpString(TestCdtOption1,"testing threading through a CDT");
            argsParser.AddAllowedOptionWithHelpString(TestCdtOption2,
                                                      "testing Constrained Delaunay Triangulation on file \'polys\'");
            argsParser.AddAllowedOptionWithHelpString(ReverseXOption,"reversing X coordinate");
            argsParser.AddOptionWithAfterStringWithHelp(EdgeSeparationOption,"use specified edge separation");
            argsParser.AddAllowedOptionWithHelpString(MdsOption,"use mds layout");
            argsParser.AddAllowedOptionWithHelpString(FdOption,"use force directed layout");
            argsParser.AddAllowedOptionWithHelpString(ConstraintsTestOption,"test constraints");
            argsParser.AddOptionWithAfterStringWithHelp(InkImportanceOption,"ink importance coefficient");
            argsParser.AddOptionWithAfterStringWithHelp(TightPaddingOption,"tight padding coefficient");
            argsParser.AddOptionWithAfterStringWithHelp(LoosePaddingOption,"loose padding coefficient");
            argsParser.AddOptionWithAfterStringWithHelp(CapacityCoeffOption,"capacity coeffiecient");
            argsParser.AddAllowedOptionWithHelpString(PolygonDistanceTestOption,"test Polygon.Distance");
            argsParser.AddAllowedOptionWithHelpString(PolygonDistanceTestOption3,"test PolygonDistance3");
            argsParser.AddAllowedOptionWithHelpString(RandomBundlingTest,"random bundling test");
            argsParser.AddAllowedOptionWithHelpString(TestCdtThreaderOption,"test CdtThreader");
            argsParser.AddAllowedOptionWithHelpString(AsyncLayoutOption,"test viewer in the async mode");

            if(!argsParser.Parse()) {
                Console.WriteLine(argsParser.UsageString());
                Environment.Exit(1);
            }
            return argsParser;
        }