vtkRemoteWriterHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkRemoteWriterHelper.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 =========================================================================*/
34 #ifndef vtkRemoteWriterHelper_h
35 #define vtkRemoteWriterHelper_h
36 
37 #include "vtkDataObjectAlgorithm.h"
38 #include "vtkPVSession.h" // for vtkPVSession::ServerFlags
39 #include "vtkRemotingServerManagerModule.h" // for exports
40 
41 class vtkAlgorithm;
43 class vtkDataObject;
44 
46 {
47 public:
48  static vtkRemoteWriterHelper* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
53 
56  void SetWriter(vtkAlgorithm* writer);
57  vtkGetObjectMacro(Writer, vtkAlgorithm);
59 
61 
68  vtkSetMacro(OutputDestination, vtkTypeUInt32);
69  vtkGetMacro(OutputDestination, vtkTypeUInt32);
71 
73 
78  void SetInterpreter(vtkClientServerInterpreter* interp);
79  vtkGetObjectMacro(Interpreter, vtkClientServerInterpreter);
81 
83  void operator=(const vtkRemoteWriterHelper&) = delete;
84 
85 protected:
87  ~vtkRemoteWriterHelper() override;
88 
89  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
90  vtkInformationVector* outputVector) override;
91  int FillInputPortInformation(int port, vtkInformation* info) override;
92 
96  void WriteLocally(vtkDataObject* input);
97 
98  vtkTypeUInt32 OutputDestination = vtkPVSession::CLIENT;
99  vtkAlgorithm* Writer = nullptr;
100  vtkClientServerInterpreter* Interpreter = nullptr;
101 };
102 
103 #endif /* end of include guard: vtkRemoteWriterHelper_h */
#define VTKREMOTINGSERVERMANAGER_EXPORT
static vtkDataObjectAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Run-time VTK interpreter.
Helper to write data on client or data-server-root.
virtual int FillInputPortInformation(int port, vtkInformation *info)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void operator=(const vtkObjectBase &)