HCE project C++ developers source code library
1.1.1
HCE project developer library
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Thread.cpp
Go to the documentation of this file.
1
#include "
Thread.hpp
"
2
3
HCE::Utils::Thread::Thread
():_exitFlag(false){}
4
5
HCE::Utils::Thread::~Thread
() {
6
7
}
8
9
void
HCE::Utils::Thread::start
() {
10
if
(!this->_ownThread.isRunning()) {
11
this->_ownThread.start(*
this
);
12
}
13
else
{
14
throw
HCE::ThreadAlreadyRunningException
(
"Thread already running."
);
15
}
16
}
17
18
void
HCE::Utils::Thread::stop
() {
19
if
(this->_exitFlag ==
false
) {
20
this->_exitFlag =
true
;
21
}
22
else
{
23
//...
24
}
25
}
26
27
void
HCE::Utils::Thread::join
() {
28
if
(this->_ownThread.isRunning()) {
29
this->_ownThread.join();
30
}
31
else
{
32
throw
HCE::ThreadAlreadyJoinedException
(
"Thread already join."
);
33
}
34
}
35
36
bool
HCE::Utils::Thread::isRunning
() {
37
return
this->_ownThread.isRunning();
38
}
sources
applicationFramework
src
Thread.cpp
Generated on Mon Jan 13 2014 13:08:36 for HCE project C++ developers source code library by
1.8.1.2