]> git.donarmstrong.com Git - mothur.git/blobdiff - commandoptionparser.cpp
created mothurOut class to handle logfiles
[mothur.git] / commandoptionparser.cpp
index f013a25361366bfecbecdccf0dd1d00c7805d16e..df216da738e7ba6dd92ec0817c6353b0b1723870 100644 (file)
@@ -16,6 +16,8 @@
 //This Function parses through the command line and pulls out the command then sends the options to  the parseGlobalData
 CommandOptionParser::CommandOptionParser(string input){
        try {
+               m = MothurOut::getInstance();
+               
                int openParen = input.find_first_of('(');
                int closeParen = input.find_last_of(')');
                optionString = "";
@@ -25,14 +27,14 @@ CommandOptionParser::CommandOptionParser(string input){
                        commandString = input.substr(0, openParen);   //commandString contains everything before "("
                        optionString = input.substr((openParen+1), (closeParen-openParen-1)); //optionString contains everything between "(" and ")".
                }
-               else if (openParen == -1) { mothurOut("You are missing ("); mothurOutEndLine(); }
-               else if (closeParen == -1) { mothurOut("You are missing )"); mothurOutEndLine(); }
+               else if (openParen == -1) { m->mothurOut("You are missing ("); m->mothurOutEndLine(); }
+               else if (closeParen == -1) { m->mothurOut("You are missing )"); m->mothurOutEndLine(); }
                                        
                //GlobalData* globaldata = GlobalData::getInstance();
                //globaldata->parseGlobalData(commandString, optionString);                     //parser to separate and check options
        }
        catch(exception& e) {
-               errorOut(e, "CommandOptionParser", "CommandOptionParser");
+               m->errorOut(e, "CommandOptionParser", "CommandOptionParser");
                exit(1);
        }
 }