]> git.donarmstrong.com Git - mothur.git/blob - source/commandparameter.h
fixing
[mothur.git] / source / commandparameter.h
1 #ifndef COMMANDPARAMETER_H
2 #define COMMANDPARAMETER_H
3
4
5 /*
6  *  commandparameter.h
7  *  Mothur
8  *
9  *  Created by westcott on 3/23/11.
10  *  Copyright 2011 Schloss Lab. All rights reserved.
11  *
12  */
13
14
15
16 #include "mothur.h"
17
18 //**********************************************************************************************************************
19
20 class CommandParameter {
21         
22         public:
23                 CommandParameter() { name = ""; type = ""; options = ""; optionsDefault = ""; chooseOnlyOneGroup = ""; chooseAtLeastOneGroup = ""; linkedGroup = ""; multipleSelectionAllowed = false; required = false; }
24                 CommandParameter(string n, string t, string o, string d, string only, string atLeast, string linked, bool m, bool r) : name(n), type(t), options(o), optionsDefault(d), 
25                                 chooseOnlyOneGroup(only), chooseAtLeastOneGroup(atLeast), linkedGroup(linked), multipleSelectionAllowed(m), required(r) {}
26                 ~CommandParameter() {}
27         
28                 string name;            //something like fasta, processors, method
29                 string type;  //must be set to "Boolean", "Multiple", "Number", "String", "InputTypes" - InputTypes is for file inputs
30                 string options; //if the parameter has specific options allowed, used for parameters of type "Multiple", something like "furthest-nearest-average", or "sobs-chao...", leave blank for command that do not required specific options
31                 string optionsDefault;   //the default for this parameter, could be something like "F" for a boolean or "100" for a number or "sobs-chao" for multiple
32                 
33         
34                 //for chooseOnlyOneGroup, chooseAtLeastOneGroup and linkedGroup if no group is needed set to "none".
35                 string chooseOnlyOneGroup; //for file inputs: if a command has several options for input files but you can only choose one then put them in a group
36                                                                         //for instance in the read.dist command you can use a phylip or column file but not both so set chooseOnlyOneGroup for both parameters to something like "DistanceFileGroup"
37                 string chooseAtLeastOneGroup; //for file inputs: if a command has several options for input files and you want to make sure one is choosen then put them in a group
38                                                                         //for instance in the read.dist command you must provide a phylip or column file so set chooseAtLeastOneGroup for both parameters to something like "DistanceFileGroup"
39                 string linkedGroup; //for file inputs: if a command has a file option were if you provide one you must provide another you can put them in a group
40                                                                                 //for instance in the read.dist command if you provide a column file you must provide a name file so set linkedGroup for both parameters to something like "ColumnNameGroup"
41
42                 bool multipleSelectionAllowed; //for "Multiple" type to say whether you can select multiple options, for instance for calc parameter set to true, but for method set to false
43                 bool required; //is this parameter required
44         
45                 
46         private:
47 };
48
49 //**********************************************************************************************************************
50
51 #endif