VTK
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=========================================================================*/
36#ifndef vtkCriticalSection_h
37#define vtkCriticalSection_h
38
39#include "vtkCommonCoreModule.h" // For export macro
40#include "vtkObject.h"
41#include "vtkSimpleCriticalSection.h" // For simple critical section
42
43class VTKCOMMONCORE_EXPORT vtkCriticalSection : public vtkObject
44{
45public:
47
49 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
50
54 void Lock();
55
59 void Unlock();
60
61protected:
64 ~vtkCriticalSection() VTK_OVERRIDE {}
65
66private:
67 vtkCriticalSection(const vtkCriticalSection&) VTK_DELETE_FUNCTION;
68 void operator=(const vtkCriticalSection&) VTK_DELETE_FUNCTION;
69};
70
71
73{
75}
76
78{
80}
81
82#endif
Critical section locking class.
void Unlock()
Unlock the vtkCriticalSection.
static vtkCriticalSection * New()
~vtkCriticalSection() override
void Lock()
Lock the vtkCriticalSection.
vtkSimpleCriticalSection SimpleCriticalSection
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
Critical section locking class.
void Unlock()
Unlock the vtkCriticalSection.
void Lock()
Lock the vtkCriticalSection.