5 * Created by Pat Schloss on 8/14/08.
6 * Copyright 2008 Patrick D. Schloss. All rights reserved.
12 #include "progress.hpp"
17 const int totalTicks = 50;
18 const char marker = '|';
21 /***********************************************************************/
23 Progress::Progress(string job, int end){
25 cout << "*******************#****#****#****#****#****#****#****#****#****#****#\n";
26 cout << job << marker;
33 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
37 cout << "An unknown error has occurred in the Progress class function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
42 /***********************************************************************/
44 void Progress::update(const int currentPos){
46 int ratio = int(totalTicks * (float)currentPos / finalPos);
49 for(int i=nTicks;i<ratio;i++){
57 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
61 cout << "An unknown error has occurred in the Progress class function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
66 /***********************************************************************/
68 void Progress::finish(){
70 for(int i=nTicks;i<totalTicks;i++){
77 cout << "**********************************************************************\n";
81 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function finish. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
85 cout << "An unknown error has occurred in the Progress class function finish. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
90 /***********************************************************************/