From 0b90077b65cab03d00ef8f8c761afc3593f1b386 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Tue, 30 Oct 2007 09:51:08 +0100 Subject: [PATCH] Introduce -i for only identifying the model, excluding sorting. --- src/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); -- 2.39.2