From: Michael Andreen Date: Tue, 30 Oct 2007 08:51:08 +0000 (+0100) Subject: Introduce -i for only identifying the model, excluding sorting. X-Git-Tag: v0.1~6 X-Git-Url: https://ruin.nu/git/?p=germs.git;a=commitdiff_plain;h=0b90077b65cab03d00ef8f8c761afc3593f1b386 Introduce -i for only identifying the model, excluding sorting. --- diff --git a/src/main.cpp b/src/main.cpp index d9bce2f..fe58138 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,10 +20,11 @@ int main(int argc, char** argv){ string ann = "default.ann"; Model model(0); bool detectModel = true; + bool onlyIdentify = false; //Parse command line arguments int opt; - while ((opt = getopt(argc, argv, "m:n:h")) != -1) { + while ((opt = getopt(argc, argv, "im:n:h")) != -1) { switch (opt) { case 'm': model = Model::modelFactory(optarg); @@ -32,6 +33,9 @@ int main(int argc, char** argv){ case 'n': ann = optarg; break; + case 'i': + onlyIdentify = true; + break; case 'h': cout << "Usage: " << argv[0] << " [OPTION] [FILE]" << endl << endl << " -m Specifies which model to use for sorting: Whirl, X, Zipper, FatX or Cloud " @@ -84,6 +88,9 @@ int main(int argc, char** argv){ //copy(go.begin(), go.end(), ostream_iterator(cout, " ")); //cout << endl; + if (onlyIdentify){ + return EXIT_SUCCESS; + } //Sort GeneSorter so; GeneSorter::ActionList al = so.sort(go,model);