VTK
dox
opt
build
vtk6-6.3.0+dfsg2
Common
Core
vtkCriticalSection.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkCriticalSection.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
=========================================================================*/
35
#ifndef vtkCriticalSection_h
36
#define vtkCriticalSection_h
37
38
#include "
vtkCommonCoreModule.h
"
// For export macro
39
#include "
vtkObject.h
"
40
#include "
vtkSimpleCriticalSection.h
"
// For simple critical section
41
42
class
VTKCOMMONCORE_EXPORT
vtkCriticalSection
:
public
vtkObject
43
{
44
public
:
45
static
vtkCriticalSection
*
New
();
46
47
vtkTypeMacro
(
vtkCriticalSection
,
vtkObject
);
48
void
PrintSelf
(ostream& os,
vtkIndent
indent);
49
51
void
Lock();
52
54
void
Unlock();
55
56
protected
:
57
vtkSimpleCriticalSection
SimpleCriticalSection
;
58
vtkCriticalSection
() {}
59
~vtkCriticalSection
() {}
60
61
private
:
62
vtkCriticalSection
(
const
vtkCriticalSection
&);
// Not implemented.
63
void
operator=(
const
vtkCriticalSection
&);
// Not implemented.
64
};
65
66
67
inline
void
vtkCriticalSection::Lock
()
68
{
69
this->
SimpleCriticalSection
.
Lock
();
70
}
71
72
inline
void
vtkCriticalSection::Unlock
()
73
{
74
this->
SimpleCriticalSection
.
Unlock
();
75
}
76
77
#endif
vtkCriticalSection::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
VTKCOMMONCORE_EXPORT
#define VTKCOMMONCORE_EXPORT
Definition:
vtkCommonCoreModule.h:15
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition:
vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:62
vtkCriticalSection::New
static vtkCriticalSection * New()
vtkCriticalSection::Lock
void Lock()
Definition:
vtkCriticalSection.h:67
vtkSimpleCriticalSection.h
vtkSimpleCriticalSection::Unlock
void Unlock()
vtkCommonCoreModule.h
vtkCriticalSection::vtkCriticalSection
vtkCriticalSection()
Definition:
vtkCriticalSection.h:58
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkSimpleCriticalSection
Critical section locking class.
Definition:
vtkSimpleCriticalSection.h:68
vtkObject.h
vtkCriticalSection
Critical section locking class.
Definition:
vtkCriticalSection.h:43
vtkCriticalSection::~vtkCriticalSection
~vtkCriticalSection()
Definition:
vtkCriticalSection.h:59
vtkCriticalSection::Unlock
void Unlock()
Definition:
vtkCriticalSection.h:72
vtkCriticalSection::SimpleCriticalSection
vtkSimpleCriticalSection SimpleCriticalSection
Definition:
vtkCriticalSection.h:57
vtkSimpleCriticalSection::Lock
void Lock()
Generated by
1.8.20