VTKExtensions
Core
vtkCommunicationErrorCatcher.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: ParaView
4
Module: vtkCommunicationErrorCatcher.h
5
6
Copyright (c) Kitware, Inc.
7
All rights reserved.
8
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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
=========================================================================*/
31
#ifndef vtkCommunicationErrorCatcher_h
32
#define vtkCommunicationErrorCatcher_h
33
34
#include "
vtkPVVTKExtensionsCoreModule.h
"
// needed for export macro
35
#include "
vtkWeakPointer.h
"
// needed for vtkWeakPointer.
36
#include <string>
37
38
class
vtkCommunicator
;
39
class
vtkMultiProcessController
;
40
class
vtkObject
;
41
42
class
VTKPVVTKEXTENSIONSCORE_EXPORT
vtkCommunicationErrorCatcher
43
{
44
public
:
45
vtkCommunicationErrorCatcher
(
vtkMultiProcessController
*);
46
vtkCommunicationErrorCatcher
(
vtkCommunicator
*);
47
virtual
~
vtkCommunicationErrorCatcher
();
48
52
bool
GetErrorsRaised
()
const
{
return
this->ErrorsRaised; }
53
57
const
std::string&
GetErrorMessages
()
const
{
return
this->ErrorMessages; }
58
59
private
:
60
vtkCommunicationErrorCatcher
(
const
vtkCommunicationErrorCatcher
&) =
delete
;
61
void
operator=(
const
vtkCommunicationErrorCatcher
&) =
delete
;
62
63
void
Initialize();
64
void
OnErrorEvent(
vtkObject
* caller,
unsigned
long
eventid,
void
* calldata);
65
66
vtkWeakPointer<vtkMultiProcessController>
Controller;
67
vtkWeakPointer<vtkCommunicator>
Communicator;
68
69
bool
ErrorsRaised;
70
std::string ErrorMessages;
71
unsigned
long
ControllerObserverId;
72
unsigned
long
CommunicatorObserverId;
73
};
74
75
#endif
76
// VTK-HeaderTest-Exclude: vtkCommunicationErrorCatcher.h
vtkCommunicator
vtkObject
vtkCommunicationErrorCatcher
helper class to catch errors from vtkMultiProcessController and vtkCommunicator.
Definition:
vtkCommunicationErrorCatcher.h:42
VTKPVVTKEXTENSIONSCORE_EXPORT
#define VTKPVVTKEXTENSIONSCORE_EXPORT
Definition:
vtkPVVTKExtensionsCoreModule.h:15
vtkCommunicationErrorCatcher::GetErrorMessages
const std::string & GetErrorMessages() const
Get the combined error messages.
Definition:
vtkCommunicationErrorCatcher.h:57
vtkCommunicationErrorCatcher::GetErrorsRaised
bool GetErrorsRaised() const
Get the status of errors.
Definition:
vtkCommunicationErrorCatcher.h:52
vtkWeakPointer< vtkMultiProcessController >
vtkWeakPointer.h
vtkPVVTKExtensionsCoreModule.h
vtkMultiProcessController
Generated by
1.8.13 on Wed Jan 27 2021