5 * Created by Pat Schloss on 8/14/08.
6 * Copyright 2008 Patrick D. Schloss. All rights reserved.
11 #include "progress.hpp"
15 const int totalTicks = 50;
16 const char marker = '|';
19 /***********************************************************************/
23 cout << "********************#****#****#****#****#****#****#****#****#****#****#";
29 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
33 cout << "An unknown error has occurred in the Progress class function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
38 /***********************************************************************/
40 Progress::Progress(string job, int end){
42 cout << "********************#****#****#****#****#****#****#****#****#****#****#\n";
43 cout << setw(20) << left << job << setw(1) << marker;
50 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
54 cout << "An unknown error has occurred in the Progress class function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
59 /***********************************************************************/
61 void Progress::newLine(string job, int end){
64 cout << setw(20) << left << job << setw(1) << marker;
71 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function newline. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
75 cout << "An unknown error has occurred in the Progress class function newline. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
80 /***********************************************************************/
82 void Progress::update(const int currentPos){
84 int ratio = int(totalTicks * (float)currentPos / finalPos);
87 for(int i=nTicks;i<ratio;i++){
95 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
99 cout << "An unknown error has occurred in the Progress class function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
104 /***********************************************************************/
106 void Progress::finish(){
108 for(int i=nTicks;i<totalTicks;i++){
115 cout << "***********************************************************************\n";
118 catch(exception& e) {
119 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function finish. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
123 cout << "An unknown error has occurred in the Progress class function finish. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
128 /***********************************************************************/