OpenZWave Library
1.6.1133
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
cpp
src
platform
Thread.h
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------
2
//
3
// Thread.h
4
//
5
// Cross-platform threads
6
//
7
// Copyright (c) 2010 Mal Lansell <mal@lansell.org>
8
// All rights reserved.
9
//
10
// SOFTWARE NOTICE AND LICENSE
11
//
12
// This file is part of OpenZWave.
13
//
14
// OpenZWave is free software: you can redistribute it and/or modify
15
// it under the terms of the GNU Lesser General Public License as published
16
// by the Free Software Foundation, either version 3 of the License,
17
// or (at your option) any later version.
18
//
19
// OpenZWave is distributed in the hope that it will be useful,
20
// but WITHOUT ANY WARRANTY; without even the implied warranty of
21
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
// GNU Lesser General Public License for more details.
23
//
24
// You should have received a copy of the GNU Lesser General Public License
25
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
26
//
27
//-----------------------------------------------------------------------------
28
#ifndef _Thread_H
29
#define _Thread_H
30
31
#include <string>
32
#include "
Defs.h
"
33
#include "
platform/Wait.h
"
34
35
namespace
OpenZWave
36
{
37
namespace
Internal
38
{
39
namespace
Platform
40
{
41
class
ThreadImpl;
42
class
Event;
43
47
class
Thread
:
public
Wait
48
{
49
public
:
50
typedef
void (*
pfnThreadProc_t
)(
Event
* _exitEvent,
void
* _context);
51
56
Thread
(
string
const
& _name);
57
69
bool
Start
(
pfnThreadProc_t
_pfnThreadProc,
void
* _context);
70
78
bool
Stop
();
79
84
void
Sleep
(
uint32
_millisecs);
85
86
protected
:
90
virtual
bool
IsSignalled
();
91
96
virtual
~Thread
();
97
98
private
:
99
ThreadImpl
* m_pImpl;
// Pointer to an object that encapsulates the platform-specific implementation of a thread.
100
Event
* m_exitEvent;
101
};
102
}
// namespace Platform
103
}
// namespace Internal
104
}
// namespace OpenZWave
105
106
#endif //_Thread_H
107
OpenZWave
Definition:
Bitfield.cpp:30
Wait.h
OpenZWave::Internal::Platform::Thread::pfnThreadProc_t
void(* pfnThreadProc_t)(Event *_exitEvent, void *_context)
Definition:
Thread.h:50
OpenZWave::Internal::Platform::Thread
Implements a platform-independent thread management class.
Definition:
Thread.h:47
OpenZWave::Internal::Platform::Thread::Stop
bool Stop()
Definition:
Thread.cpp:80
OpenZWave::Internal::Platform::Wait
Platform-independent definition of Wait objects.
Definition:
Wait.h:46
OpenZWave::Internal::Platform::Event
Platform-independent definition of event objects.
Definition:
Event.h:44
Defs.h
OpenZWave::Internal::Platform::Thread::Sleep
void Sleep(uint32 _millisecs)
Definition:
Thread.cpp:99
OpenZWave::Internal::Platform::Thread::IsSignalled
virtual bool IsSignalled()
Definition:
Thread.cpp:108
uint32
unsigned int uint32
Definition:
Defs.h:91
OpenZWave::Internal::Platform::Thread::Thread
Thread(string const &_name)
Definition:
Thread.cpp:51
OpenZWave::Internal::Platform::Wait::ThreadImpl
friend class ThreadImpl
Definition:
Wait.h:49
OpenZWave::Internal::Platform::Thread::~Thread
virtual ~Thread()
Definition:
Thread.cpp:61
OpenZWave::Internal::Platform::Thread::Start
bool Start(pfnThreadProc_t _pfnThreadProc, void *_context)
Definition:
Thread.cpp:71
Generated on Mon Jun 1 2020 10:40:08 for OpenZWave Library by
1.8.8