InputData::InputData(string fName, string f) : format(f){
m = MothurOut::getInstance();
- globaldata = GlobalData::getInstance();
m->openInputFile(fName, fileHandle);
filename = fName;
-
+ m->saveNextLabel = "";
}
-
/***********************************************************************/
-
InputData::~InputData(){
fileHandle.close();
- globaldata = GlobalData::getInstance();
- globaldata->saveNextLabel = "";
-// delete output;
-
+ m->saveNextLabel = "";
}
/***********************************************************************/
InputData::InputData(string fName, string orderFileName, string f) : format(f){
try {
m = MothurOut::getInstance();
- globaldata = GlobalData::getInstance();
ifstream ofHandle;
m->openInputFile(orderFileName, ofHandle);
string name;
ofHandle.close();
m->openInputFile(fName, fileHandle);
+ m->saveNextLabel = "";
+
}
catch(exception& e) {
m->errorOut(e, "InputData", "InputData");
else if(format == "sabund"){
input = new SAbundVector(fileHandle);
}
-
+
m->gobble(fileHandle);
output = new OrderVector();
}
}
-
+
in.close();
output = new OrderVector();
}
}else if (format == "shared") {
SharedList = new SharedListVector(fileHandle);
+
if (SharedList != NULL) {
return SharedList->getSharedRAbundVector();
}
string thisLabel;
m->openInputFile(filename, in);
- globaldata->saveNextLabel = "";
+ m->saveNextLabel = "";
if(in){
if (format == "sharedfile") {
while (in.eof() != true) {
SharedList = new SharedListVector(in);
+
if (SharedList != NULL) {
thisLabel = SharedList->getLabel();
//if you are at the last label
string thisLabel;
m->openInputFile(filename, in);
- globaldata->saveNextLabel = "";
+ m->saveNextLabel = "";
if(in){
if (format == "relabund") {
}
else if(format == "sabund"){
input = new SAbundVector(fileHandle);
- }
-
+ }
m->gobble(fileHandle);
sabund = new SAbundVector();
else if(format == "sabund"){
input = new SAbundVector(fileHandle);
}
-
+
m->gobble(fileHandle);
rabund = new RAbundVector();
}
- }
+ }
+
in.close();