Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
icl_core
src
icl_core_logging
icl_core_logging/Thread.h
Go to the documentation of this file.
1
// this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2
3
// -- BEGIN LICENSE BLOCK ----------------------------------------------
4
// This file is part of FZIs ic_workspace.
5
//
6
// This program is free software licensed under the LGPL
7
// (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
8
// You can find a copy of this license in LICENSE folder in the top
9
// directory of the source code.
10
//
11
// © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
12
//
13
// -- END LICENSE BLOCK ------------------------------------------------
14
15
//----------------------------------------------------------------------
26
//----------------------------------------------------------------------
27
#ifndef ICL_CORE_LOGGING_THREAD_H_INCLUDED
28
#define ICL_CORE_LOGGING_THREAD_H_INCLUDED
29
30
#include <
icl_core/BaseTypes.h
>
31
#include <
icl_core/os_thread.h
>
32
#include <
icl_core/Noncopyable.h
>
33
#include "
icl_core_logging/ImportExport.h
"
34
35
namespace
icl_core
{
36
namespace
logging {
37
38
class
ThreadImpl;
39
46
class
ICL_CORE_LOGGING_IMPORT_EXPORT
Thread
:
protected
virtual
icl_core::Noncopyable
47
{
48
public
:
53
Thread
(
icl_core::ThreadPriority
priority = 0);
54
56
virtual
~
Thread
();
57
64
bool
execute
()
const
{
return
m_execute; }
65
69
void
join
();
70
77
virtual
void
run() = 0;
78
80
bool
running
()
const
{
return
!m_finished; }
81
87
bool
start();
88
94
void
stop
() { waitStarted(); m_execute =
false
; }
95
96
private
:
100
virtual
void
runThread();
101
103
void
waitStarted()
const
;
104
105
bool
m_execute
;
106
bool
m_finished
;
107
bool
m_joined
;
108
bool
m_starting
;
109
110
ThreadImpl
*
m_impl
;
111
112
// Declare thread implementations as friends so that they have access to the
113
// RunThread() function!
114
friend
class
ThreadImplLxrt33
;
115
friend
class
ThreadImplLxrt35
;
116
friend
class
ThreadImplLxrt38
;
117
friend
class
ThreadImplPosix
;
118
friend
class
ThreadImplWin32
;
119
};
120
121
}
122
}
123
124
#endif
ImportExport.h
Contains import/export definitions for the Win32 plattform.
icl_core::logging::ThreadImpl
Definition:
icl_core_logging/ThreadImpl.h:35
icl_core::join
String join(const std::vector< String > &substrings, const String &delimiter)
Definition:
StringHelper.cpp:49
icl_core::logging::Thread::m_joined
bool m_joined
Definition:
icl_core_logging/Thread.h:107
icl_core::logging::Thread::m_execute
bool m_execute
Definition:
icl_core_logging/Thread.h:105
icl_core::logging::ThreadImplWin32
Definition:
icl_core_logging/ThreadImplWin32.h:42
os_thread.h
Contains global thread related functions, encapsulated into the icl_core::os namespace.
icl_core::logging::Thread
Definition:
icl_core_logging/Thread.h:46
icl_core::logging::ThreadImplLxrt33
Definition:
icl_core_logging/ThreadImplLxrt33.h:43
icl_core::logging::Thread::m_starting
bool m_starting
Definition:
icl_core_logging/Thread.h:108
icl_core::logging::Thread::execute
bool execute() const
Definition:
icl_core_logging/Thread.h:64
icl_core::logging::ThreadImplLxrt38
Definition:
icl_core_logging/ThreadImplLxrt38.h:45
icl_core::Noncopyable
Definition:
Noncopyable.h:34
BaseTypes.h
Contains Interface base classes and base types.
icl_core::logging::Thread::running
bool running() const
Definition:
icl_core_logging/Thread.h:80
icl_core::logging::Thread::m_impl
ThreadImpl * m_impl
Definition:
icl_core_logging/Thread.h:110
icl_core::logging::ThreadImplPosix
Definition:
icl_core_logging/ThreadImplPosix.h:41
Noncopyable.h
Contains icl_core::Noncopyable.
ICL_CORE_LOGGING_IMPORT_EXPORT
#define ICL_CORE_LOGGING_IMPORT_EXPORT
Definition:
logging/ImportExport.h:43
icl_core::ThreadPriority
int32_t ThreadPriority
Definition:
os_thread.h:50
icl_core
Definition:
Array2D.h:30
icl_core::logging::Thread::stop
void stop()
Definition:
icl_core_logging/Thread.h:94
icl_core::logging::Thread::m_finished
bool m_finished
Definition:
icl_core_logging/Thread.h:106
icl_core::logging::ThreadImplLxrt35
Definition:
icl_core_logging/ThreadImplLxrt35.h:44
fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:58