]> git.donarmstrong.com Git - mothur.git/blob - commandparameter.h
changes while testing
[mothur.git] / 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; important = false; outputTypes = ""; }
24                 CommandParameter(string n, string t, string o, string d, string only, string atLeast, string linked, string opt, bool m, bool r, bool i) : name(n), type(t), options(o), optionsDefault(d), 
25                                 chooseOnlyOneGroup(only), chooseAtLeastOneGroup(atLeast), linkedGroup(linked), outputTypes(opt),multipleSelectionAllowed(m), required(r), important(i) {}
26         CommandParameter(string n, string t, string o, string d, string only, string atLeast, string linked, string opt, bool m, bool r) : name(n), type(t), options(o), optionsDefault(d), 
27     chooseOnlyOneGroup(only), chooseAtLeastOneGroup(atLeast), linkedGroup(linked), outputTypes(opt), multipleSelectionAllowed(m), required(r)  { important = false; }
28                 ~CommandParameter() {}
29         
30                 string name;            //something like fasta, processors, method
31                 string type;  //must be set to "Boolean", "Multiple", "Number", "String", "InputTypes" - InputTypes is for file inputs
32                 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
33                 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
34                 
35         
36                 //for chooseOnlyOneGroup, chooseAtLeastOneGroup and linkedGroup if no group is needed set to "none".
37                 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
38                                                                         //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"
39                 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
40                                                                         //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"
41                 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
42                                                                                 //for instance in the cluster command if you provide a column file you must provide a name file so set linkedGroup for both parameters to something like "ColumnNameGroup"
43
44                 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
45                 bool required; //is this parameter required
46     
47         bool important; //is this parameter important.  The gui will put "important" parameters first in the option panel.
48         
49         string outputTypes; //types on files created by the command if this parameter is given.  ie. get.seqs command fasta parameter makes a fasta file. can be multiple values split by dashes.
50                 
51         private:
52 };
53
54 //**********************************************************************************************************************
55
56 #endif