5 * Created by Sarah Westcott on 6/8/09.
6 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10 #include "optionparser.h"
12 /***********************************************************************/
14 OptionParser::OptionParser(string option) {
16 m = MothurOut::getInstance();
20 //reads in parameters and values
21 while((option.find_first_of(',') != -1)) { //while there are parameters
22 m->splitAtComma(value, option);
23 m->splitAtEquals(key, value);
24 parameters[key] = value;
27 //in case there is no comma and to get last parameter after comma
28 m->splitAtEquals(key, option);
29 parameters[key] = option;
33 m->errorOut(e, "OptionParser", "parse");
38 /***********************************************************************/
40 map<string, string> OptionParser::getParameters() { return parameters; }
42 /***********************************************************************/