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 /***********************************************************************/
21 Progress::Progress(string job, int end){
23 cout << "********************#****#****#****#****#****#****#****#****#****#****#\n";
24 cout << job << marker;
31 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
35 cout << "An unknown error has occurred in the Progress class function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
40 /***********************************************************************/
42 void Progress::update(const int currentPos){
44 int ratio = int(totalTicks * (float)currentPos / finalPos);
47 for(int i=nTicks;i<ratio;i++){
55 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
59 cout << "An unknown error has occurred in the Progress class function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
64 /***********************************************************************/
66 void Progress::finish(){
68 for(int i=nTicks;i<totalTicks;i++){
75 cout << "***********************************************************************\n";
79 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function finish. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
83 cout << "An unknown error has occurred in the Progress class function finish. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
88 /***********************************************************************/