VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Common
System
vtkThreadMessager.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkThreadMessager.h
5
6
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7
All rights reserved.
8
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10
This software is distributed WITHOUT ANY WARRANTY; without even
11
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12
PURPOSE. See the above copyright notice for more information.
13
14
=========================================================================*/
22
#ifndef __vtkThreadMessager_h
23
#define __vtkThreadMessager_h
24
25
#include "vtkCommonSystemModule.h"
// For export macro
26
#include "
vtkObject.h
"
27
28
#if defined(VTK_USE_PTHREADS) || defined(VTK_HP_PTHREADS)
29
#include <pthread.h>
// Needed for pthread types
30
#endif
31
32
class
VTKCOMMONSYSTEM_EXPORT
vtkThreadMessager
:
public
vtkObject
33
{
34
public
:
35
static
vtkThreadMessager
*
New
();
36
37
vtkTypeMacro(
vtkThreadMessager
,
vtkObject
);
38
void
PrintSelf
(ostream& os,
vtkIndent
indent);
39
41
void
WaitForMessage();
42
44
void
SendWakeMessage();
45
49
void
EnableWaitForReceiver();
50
54
void
DisableWaitForReceiver();
55
58
void
WaitForReceiver();
59
60
protected
:
61
vtkThreadMessager
();
62
~
vtkThreadMessager
();
63
64
#ifdef VTK_USE_PTHREADS
65
pthread_mutex_t Mutex;
66
pthread_cond_t PSignal;
67
#endif
68
69
#ifdef VTK_USE_WIN32_THREADS
70
vtkWindowsHANDLE WSignal;
71
#endif
72
73
private
:
74
vtkThreadMessager
(
const
vtkThreadMessager
&);
// Not implemented.
75
void
operator=(
const
vtkThreadMessager
&);
// Not implemented.
76
};
77
78
#endif
Generated on Thu May 24 2012 22:22:13 for VTK by
1.8.1