* Dotur
*
* Created by Sarah Westcott on 11/18/08.
- * Copyright 2008 __MyCompanyName__. All rights reserved.
+ * Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved.
*
*/
ListVector* InputData::getListVector(){
try {
if(fileHandle){
- if((format == "list") || (format == "shared")){
+ if(format == "list") {
list = new ListVector(fileHandle);
}
}
}
+/***********************************************************************/
+
+SharedListVector* InputData::getSharedListVector(){
+ try {
+ if(fileHandle){
+ if (format == "shared") {
+ SharedList = new SharedListVector(fileHandle);
+ }
+
+ gobble(fileHandle);
+ return SharedList;
+ }
+ else{
+ return 0;
+ }
+ }
+ catch(exception& e) {
+ cout << "Standard Error: " << e.what() << " has occurred in the InputData class Function getOrderVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+ catch(...) {
+ cout << "An unknown error has occurred in the InputData class function getOrderVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+}
+
+/***********************************************************************/
+
+SharedOrderVector* InputData::getSharedOrderVector(){
+ try {
+ if(fileHandle){
+ if (format == "sharedfile") {
+ SharedOrder = new SharedOrderVector(fileHandle);
+ }
+
+ gobble(fileHandle);
+ return SharedOrder;
+
+ }else{
+ return 0;
+ }
+ }
+ catch(exception& e) {
+ cout << "Standard Error: " << e.what() << " has occurred in the InputData class Function getSharedOrderVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+ catch(...) {
+ cout << "An unknown error has occurred in the InputData class function getSharedOrderVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+}
+
/***********************************************************************/
OrderVector* InputData::getOrderVector(){
try {
if(fileHandle){
- if((format == "list") || (format == "shared")){
+ if(format == "list") {
input = new ListVector(fileHandle);
}
+ else if (format == "shared") {
+ input = new SharedListVector(fileHandle);
+ }
else if(format == "rabund"){
input = new RAbundVector(fileHandle);
}
gobble(fileHandle);
output = new OrderVector();
*output = (input->getOrderVector());
- //delete input;
+
return output;
}
else{
SAbundVector* InputData::getSAbundVector(){
try {
if(fileHandle){
- if((format == "list") || (format == "shared")){
+ if (format == "list") {
input = new ListVector(fileHandle);
}
+ else if (format == "shared") {
+ input = new SharedListVector(fileHandle);
+ }
else if(format == "rabund"){
input = new RAbundVector(fileHandle);
}