Progress::Progress(){
try {
- mothurOut("********************#****#****#****#****#****#****#****#****#****#****#");
+ m = MothurOut::getInstance();
+ m->mothurOut("********************#****#****#****#****#****#****#****#****#****#****#");
nTicks = 0;
finalPos = 0;
}
catch(exception& e) {
- errorOut(e, "Progress", "Progress");
+ m->errorOut(e, "Progress", "Progress");
exit(1);
}
}
Progress::Progress(string job, int end){
try {
- mothurOut("********************#****#****#****#****#****#****#****#****#****#****#\n");
+ m = MothurOut::getInstance();
+
+ m->mothurOut("********************#****#****#****#****#****#****#****#****#****#****#\n");
cout << setw(20) << left << job << setw(1) << marker;
- mothurOutJustToLog(job);
- mothurOut(toString(marker));
+ m->mothurOutJustToLog(job);
+ m->mothurOut(toString(marker));
cout.flush();
nTicks = 0;
finalPos = end;
+
}
catch(exception& e) {
- errorOut(e, "Progress", "Progress");
+ m->errorOut(e, "Progress", "Progress");
exit(1);
}
}
void Progress::newLine(string job, int end){
try {
- mothurOutEndLine();
+ m->mothurOutEndLine();
cout << setw(20) << left << job << setw(1) << marker;
- mothurOutJustToLog(job);
- mothurOut(toString(marker));
+ m->mothurOutJustToLog(job);
+ m->mothurOut(toString(marker));
cout.flush();
nTicks = 0;
finalPos = end;
}
catch(exception& e) {
- errorOut(e, "Progress", "newLine");
+ m->errorOut(e, "Progress", "newLine");
exit(1);
}
}
if(ratio > nTicks){
for(int i=nTicks;i<ratio;i++){
- mothurOut(toString(marker));
+ m->mothurOut(toString(marker));
cout.flush();
}
nTicks = ratio;
}
}
catch(exception& e) {
- errorOut(e, "Progress", "update");
+ m->errorOut(e, "Progress", "update");
exit(1);
}
}
void Progress::finish(){
try {
for(int i=nTicks;i<totalTicks;i++){
- mothurOut(toString(marker));
+ m->mothurOut(toString(marker));
cout.flush();
}
- mothurOutEndLine();
- mothurOut("***********************************************************************\n");
+ m->mothurOutEndLine();
+ m->mothurOut("***********************************************************************\n");
cout.flush();
}
catch(exception& e) {
- errorOut(e, "Progress", "finish");
+ m->errorOut(e, "Progress", "finish");
exit(1);
}
}