]> git.donarmstrong.com Git - mothur.git/blob - command.hpp
added set.current and get.current commands and modified existing commands to update...
[mothur.git] / command.hpp
1 #ifndef COMMAND_HPP
2 #define COMMAND_HPP
3
4 /*
5  *  command.h
6  *  
7  *
8  *  Created by Pat Schloss on 10/23/08.
9  *  Copyright 2008 Patrick D. Schloss. All rights reserved.
10  *
11  */
12
13 /*This class is a parent to all the command classes.  */
14
15
16 #include "mothur.h"
17 #include "optionparser.h"
18 #include "validparameter.h"
19 #include "mothurout.h"
20
21
22 class Command {
23         
24         public:
25                 Command() {  m = MothurOut::getInstance();   } 
26                 virtual vector<string> getValidParameters() = 0;
27                 virtual vector<string> getRequiredParameters() = 0; //adding "or" as the last element indicates one of the previous is needed
28                 virtual vector<string> getRequiredFiles() = 0; //adding "or" as the last element indicates one of the previous is needed
29                 virtual map<string, vector<string> > getOutputFiles() = 0; //file type to names
30                 virtual int execute() = 0;
31                 virtual void help() = 0;
32                 virtual ~Command() { }
33         protected:
34                 MothurOut* m;
35                 bool calledHelp;
36         
37                 map<string, vector<string> >::iterator itTypes;
38 };
39
40 #endif