5 * Created by Pat Schloss on 8/14/08.
6 * Copyright 2008 Patrick D. Schloss. All rights reserved.
11 #include "progress.hpp"
13 const int totalTicks = 50;
14 const char marker = '|';
17 /***********************************************************************/
21 cout << "********************#****#****#****#****#****#****#****#****#****#****#";
27 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
31 cout << "An unknown error has occurred in the Progress class function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
36 /***********************************************************************/
38 Progress::Progress(string job, int end){
40 cout << "********************#****#****#****#****#****#****#****#****#****#****#\n";
41 cout << setw(20) << left << job << setw(1) << marker;
48 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
52 cout << "An unknown error has occurred in the Progress class function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
57 /***********************************************************************/
59 void Progress::newLine(string job, int end){
62 cout << setw(20) << left << job << setw(1) << marker;
69 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function newline. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
73 cout << "An unknown error has occurred in the Progress class function newline. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
78 /***********************************************************************/
80 void Progress::update(const int currentPos){
82 int ratio = int(totalTicks * (float)currentPos / finalPos);
85 for(int i=nTicks;i<ratio;i++){
93 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
97 cout << "An unknown error has occurred in the Progress class function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
102 /***********************************************************************/
104 void Progress::finish(){
106 for(int i=nTicks;i<totalTicks;i++){
113 cout << "***********************************************************************\n";
116 catch(exception& e) {
117 cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function finish. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
121 cout << "An unknown error has occurred in the Progress class function finish. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
126 /***********************************************************************/