]> git.donarmstrong.com Git - mothur.git/blob - groupmap.h
added mothur.h and fixed includes in many files
[mothur.git] / groupmap.h
1 #ifndef GROUPMAP_H
2 #define GROUPMAP_H
3 /*
4  *  groupmap.h
5  *  Dotur
6  *
7  *  Created by Sarah Westcott on 12/1/08.
8  *  Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved.
9  *
10  */
11
12 #include "mothur.h"
13 #include "utilities.hpp"
14
15 /* This class is a representation of the groupfile.  It is used by all the shared commands to determine what group a 
16         certain sequence belongs to. */
17
18 class GroupMap {
19 public:
20         GroupMap() {};
21         GroupMap(string);
22         ~GroupMap();
23         void readMap();
24         int getNumGroups();
25         string getGroup(string);
26         void setGroup(string, string);
27         vector<string> namesOfGroups;
28         map<string, int> groupIndex;  //groupname, vectorIndex in namesOfGroups. - used by collectdisplays.
29                 
30 private:
31         ifstream fileHandle;
32         string groupFileName;
33         int index;
34         map<string, string>::iterator it;
35         void setNamesOfGroups(string); 
36         map<string, string> groupmap; //sequence name and groupname
37 };
38
39 #endif