VTKExtensions
Core
vtkCommunicationErrorCatcher.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2
// SPDX-License-Identifier: BSD-3-Clause
19
#ifndef vtkCommunicationErrorCatcher_h
20
#define vtkCommunicationErrorCatcher_h
21
22
#include "
vtkPVVTKExtensionsCoreModule.h
"
// needed for export macro
23
#include "
vtkWeakPointer.h
"
// needed for vtkWeakPointer.
24
#include <string>
// for std::string
25
26
class
vtkCommunicator
;
27
class
vtkMultiProcessController
;
28
class
vtkObject
;
29
30
class
VTKPVVTKEXTENSIONSCORE_EXPORT
vtkCommunicationErrorCatcher
31
{
32
public
:
33
vtkCommunicationErrorCatcher
(
vtkMultiProcessController
*);
34
vtkCommunicationErrorCatcher
(
vtkCommunicator
*);
35
virtual
~
vtkCommunicationErrorCatcher
();
36
40
bool
GetErrorsRaised
()
const
{
return
this->ErrorsRaised; }
41
45
const
std::string&
GetErrorMessages
()
const
{
return
this->ErrorMessages; }
46
47
private
:
48
vtkCommunicationErrorCatcher
(
const
vtkCommunicationErrorCatcher
&) =
delete
;
49
void
operator=(
const
vtkCommunicationErrorCatcher
&) =
delete
;
50
51
void
Initialize();
52
void
OnErrorEvent(
vtkObject
* caller,
unsigned
long
eventid,
void
* calldata);
53
54
vtkWeakPointer<vtkMultiProcessController>
Controller;
55
vtkWeakPointer<vtkCommunicator>
Communicator;
56
57
bool
ErrorsRaised;
58
std::string ErrorMessages;
59
unsigned
long
ControllerObserverId;
60
unsigned
long
CommunicatorObserverId;
61
};
62
63
#endif
64
// VTK-HeaderTest-Exclude: vtkCommunicationErrorCatcher.h
vtkCommunicator
vtkObject
vtkCommunicationErrorCatcher
helper class to catch errors from vtkMultiProcessController and vtkCommunicator.
Definition:
vtkCommunicationErrorCatcher.h:30
VTKPVVTKEXTENSIONSCORE_EXPORT
#define VTKPVVTKEXTENSIONSCORE_EXPORT
Definition:
vtkPVVTKExtensionsCoreModule.h:15
vtkCommunicationErrorCatcher::GetErrorMessages
const std::string & GetErrorMessages() const
Get the combined error messages.
Definition:
vtkCommunicationErrorCatcher.h:45
vtkCommunicationErrorCatcher::GetErrorsRaised
bool GetErrorsRaised() const
Get the status of errors.
Definition:
vtkCommunicationErrorCatcher.h:40
vtkWeakPointer< vtkMultiProcessController >
vtkWeakPointer.h
vtkPVVTKExtensionsCoreModule.h
vtkMultiProcessController
Generated by
1.8.13 on Tue Oct 1 2024