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) {
20 //reads in parameters and values
21 while((option.find_first_of(',') != -1)) { //while there are parameters
22 splitAtComma(value, option);
23 splitAtEquals(key, value);
24 parameters[key] = value;
27 //in case there is no comma and to get last parameter after comma
28 splitAtEquals(key, option);
29 parameters[key] = option;
33 cout << "Standard Error: " << e.what() << " has occurred in the OptionParser class Function parse. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
37 cout << "An unknown error has occurred in the OptionParser class function parse. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
42 /***********************************************************************/
44 map<string, string> OptionParser::getParameters() { return parameters; }
46 /***********************************************************************/