Signapse
src
ProgressBar.cpp
Go to the documentation of this file.
1
#include "
ProgressBar.h
"
2
#include <stdio.h>
3
#include "iostream"
4
5
ProgressBar::ProgressBar
(){
6
SetThreshold
(100);
7
}
8
9
int
ProgressBar::GetProgress
(std::string result, std::string task){
10
if
(task == result){
11
count
++;
12
}
13
int
progress = 100*
count
/
threshold
;
14
return
progress;
15
}
16
17
void
ProgressBar::ResetProgress
(){
18
count
= 0;
19
}
20
21
void
ProgressBar::SetThreshold
(
int
thres) {
22
threshold
= thres;
23
}
ProgressBar.h
ProgressBar::threshold
int threshold
Definition:
ProgressBar.h:17
ProgressBar::count
int count
Definition:
ProgressBar.h:18
ProgressBar::ResetProgress
void ResetProgress()
Definition:
ProgressBar.cpp:17
ProgressBar::GetProgress
int GetProgress(std::string s, std::string task)
Definition:
ProgressBar.cpp:9
ProgressBar::ProgressBar
ProgressBar()
Definition:
ProgressBar.cpp:5
ProgressBar::SetThreshold
void SetThreshold(int thres)
Definition:
ProgressBar.cpp:21
Generated by
1.9.3