X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=currentfile.h;h=8f2ea4822247c09dea03d2a6207f6e51c73ee7af;hp=b76397198a4c221e96b3adcb3bf00ad9cecb5f12;hb=d1c97b8c04bb75faca1e76ffad60b37a4d789d3d;hpb=5e031adc86a1fc125c4abb3d4048f209d52f9b6d diff --git a/currentfile.h b/currentfile.h index b763971..8f2ea48 100644 --- a/currentfile.h +++ b/currentfile.h @@ -17,60 +17,78 @@ class CurrentFile { -public: - - static CurrentFile* getInstance(); - - string getPhylipFile() { return phylipfile; } - string getColumnFile() { return columnfile; } - string getListFile() { return listfile; } - string getRabundFile() { return rabundfile; } - string getSabundFile() { return sabundfile; } - string getNameFile() { return namefile; } - string getGroupFile() { return groupfile; } - string getOrderFile() { return orderfile; } - string getOrderGroupFile() { return ordergroupfile; } - string getTreeFile() { return treefile; } - string getSharedFile() { return sharedfile; } - string getRelAbundFile() { return relabundfile; } - string getDesignFile() { return designfile; } - string getFastaFile() { return fastafile; } - string getSFFFile() { return sfffile; } - string getQualFile() { return qualfile; } - string getOligosFile() { return oligosfile; } - - - void setListFile(string f) { listfile = m->getFullPathName(f); } - void setTreeFile(string f) { treefile = m->getFullPathName(f); } - void setGroupFile(string f) { groupfile = m->getFullPathName(f); } - void setPhylipFile(string f) { phylipfile = m->getFullPathName(f); } - void setColumnFile(string f) { columnfile = m->getFullPathName(f); } - void setNameFile(string f) { namefile = m->getFullPathName(f); } - void setRabundFile(string f) { rabundfile = m->getFullPathName(f); } - void setSabundFile(string f) { sabundfile = m->getFullPathName(f); } - void setSharedFile(string f) { sharedfile = m->getFullPathName(f); } - void setRelAbundFile(string f) { relabundfile = m->getFullPathName(f); } - void setOrderFile(string f) { orderfile = m->getFullPathName(f); } - void setOrderGroupFile(string f) { ordergroupfile = m->getFullPathName(f); } - void setDesignFile(string f) { designfile = m->getFullPathName(f); } - void setFastaFile(string f) { fastafile = m->getFullPathName(f); } - void setSFFFile(string f) { sfffile = m->getFullPathName(f); } - void setQualFile(string f) { qualfile = m->getFullPathName(f); } - void setOligosFile(string f) { oligosfile = m->getFullPathName(f); } - -private: - - static CurrentFile* _uniqueInstance; - CurrentFile( const CurrentFile& ); // Disable copy constructor - void operator=( const CurrentFile& ); // Disable assignment operator - CurrentFile(); - ~CurrentFile(); - - MothurOut* m; - string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, designfile; - string orderfile, treefile, sharedfile, ordergroupfile, relabundfile, fastafile, qualfile, sfffile, oligosfile; + public: + static CurrentFile* getInstance() { + if(instance == 0) { instance = new CurrentFile(); } + return instance; + } + + string getPhylipFile() { return phylipfile; } + string getColumnFile() { return columnfile; } + string getListFile() { return listfile; } + string getRabundFile() { return rabundfile; } + string getSabundFile() { return sabundfile; } + string getNameFile() { return namefile; } + string getGroupFile() { return groupfile; } + string getOrderFile() { return orderfile; } + string getOrderGroupFile() { return ordergroupfile; } + string getTreeFile() { return treefile; } + string getSharedFile() { return sharedfile; } + string getRelAbundFile() { return relabundfile; } + string getDesignFile() { return designfile; } + string getFastaFile() { return fastafile; } + string getSFFFile() { return sfffile; } + string getQualFile() { return qualfile; } + string getOligosFile() { return oligosfile; } + + + void setListFile(string f) { listfile = m->getFullPathName(f); } + void setTreeFile(string f) { treefile = m->getFullPathName(f); } + void setGroupFile(string f) { groupfile = m->getFullPathName(f); } + void setPhylipFile(string f) { phylipfile = m->getFullPathName(f); } + void setColumnFile(string f) { columnfile = m->getFullPathName(f); } + void setNameFile(string f) { namefile = m->getFullPathName(f); } + void setRabundFile(string f) { rabundfile = m->getFullPathName(f); } + void setSabundFile(string f) { sabundfile = m->getFullPathName(f); } + void setSharedFile(string f) { sharedfile = m->getFullPathName(f); } + void setRelAbundFile(string f) { relabundfile = m->getFullPathName(f); } + void setOrderFile(string f) { orderfile = m->getFullPathName(f); } + void setOrderGroupFile(string f) { ordergroupfile = m->getFullPathName(f); } + void setDesignFile(string f) { designfile = m->getFullPathName(f); } + void setFastaFile(string f) { fastafile = m->getFullPathName(f); } + void setSFFFile(string f) { sfffile = m->getFullPathName(f); } + void setQualFile(string f) { qualfile = m->getFullPathName(f); } + void setOligosFile(string f) { oligosfile = m->getFullPathName(f); } + private: + MothurOut* m; + string phylipfile, columnfile, listfile, rabundfile, sabundfile, namefile, groupfile, designfile; + string orderfile, treefile, sharedfile, ordergroupfile, relabundfile, fastafile, qualfile, sfffile, oligosfile; + + static CurrentFile* instance; + CurrentFile( const CurrentFile& ); // Disable copy constructor + void operator=( const CurrentFile& ); // Disable assignment operator + CurrentFile() { + phylipfile = ""; + columnfile = ""; + listfile = ""; + rabundfile = ""; + sabundfile = ""; + namefile = ""; + groupfile = ""; + designfile = ""; + orderfile = ""; + treefile = ""; + sharedfile = ""; + ordergroupfile = ""; + relabundfile = ""; + fastafile = ""; + qualfile = ""; + sfffile = ""; + oligosfile = ""; + } + ~CurrentFile() { instance = 0; } }; /***********************************************/