25 #include "ProgressSemaphore.hh"
27 #include <Base/Debug/Error.hh>
33 #ifdef BIAS_HAVE_PTHREADS
34 pthread_mutex_init(&
Lock_, NULL);
47 #ifdef BIAS_HAVE_PTHREADS
48 pthread_mutex_lock(&
Lock_);
54 #ifdef BIAS_HAVE_PTHREADS
55 pthread_mutex_unlock(&
Lock_);
57 BIASASSERT(ratio>=0. && ratio<=1.);
64 #ifdef BIAS_HAVE_PTHREADS
65 pthread_mutex_lock(&
Lock_);
68 #ifdef BIAS_HAVE_PTHREADS
69 pthread_mutex_unlock(&
Lock_);
77 #ifdef BIAS_HAVE_PTHREADS
78 pthread_mutex_lock(&
Lock_);
81 #ifdef BIAS_HAVE_PTHREADS
82 pthread_mutex_unlock(&
Lock_);
88 #ifdef BIAS_HAVE_PTHREADS
89 pthread_mutex_lock(&
Lock_);
92 #ifdef BIAS_HAVE_PTHREADS
93 pthread_mutex_unlock(&
Lock_);
101 #ifdef BIAS_HAVE_PTHREADS
102 pthread_mutex_lock(&
Lock_);
105 #ifdef BIAS_HAVE_PTHREADS
106 pthread_mutex_unlock(&
Lock_);
112 #ifdef BIAS_HAVE_PTHREADS
113 pthread_mutex_lock(&
Lock_);
116 #ifdef BIAS_HAVE_PTHREADS
117 pthread_mutex_unlock(&
Lock_);
124 #ifdef BIAS_HAVE_PTHREADS
125 pthread_mutex_lock(&
Lock_);
128 #ifdef BIAS_HAVE_PTHREADS
129 pthread_mutex_unlock(&
Lock_);
136 #ifdef BIAS_HAVE_PTHREADS
137 pthread_mutex_lock(&
Lock_);
142 #ifdef BIAS_HAVE_PTHREADS
143 pthread_mutex_unlock(&
Lock_);
~ProgressSemaphore()
destructor
void IncrementStep()
Increment the current step.
float GetProgress()
returns current progress state in standard intervall
void SetNumSteps(unsigned int steps)
Set the number of steps to progress will need to complete.
void Reset()
Resets all values.
void SetCurrentStep(unsigned int CurrentStep)
Set the current step.
void SetTerminateFlag()
Sets a termination flag to inform e.g.
bool IsTerminationRequested()
Tells whether the termination flag is set.
unsigned int CurrentStep_
void ResetTerminateFlag()
Chancels the termination flag.