TTK
Loading...
Searching...
No Matches
ttkWebSocketIO.h
Go to the documentation of this file.
1
22
23#pragma once
24
25// VTK Module
26#include <ttkWebSocketIOModule.h>
27
28// VTK Includes
29#include <ttkAlgorithm.h>
30#include <vtkSmartPointer.h>
31
32class vtkDataObject;
33class vtkMultiBlockDataSet;
34
35// TTK Base Includes
36#include <WebSocketIO.h>
37
38class TTKWEBSOCKETIO_EXPORT ttkWebSocketIO : public ttkAlgorithm,
39 protected ttk::WebSocketIO {
40private:
41 int PortNumber{9285};
42 bool NeedsUpdate{false};
43
46
47public:
50
51 vtkSetMacro(PortNumber, int);
52 vtkGetMacro(PortNumber, int);
53
54 vtkSetMacro(NeedsUpdate, bool);
55 vtkGetMacro(NeedsUpdate, bool);
56
57 int processEvent(const std::string &eventName,
58 const std::string &eventData = "") override;
59
60protected:
62 ~ttkWebSocketIO() override;
63
64 int FillInputPortInformation(int port, vtkInformation *info) override;
65 int FillOutputPortInformation(int port, vtkInformation *info) override;
66
67 int RequestData(vtkInformation *request,
68 vtkInformationVector **inputVector,
69 vtkInformationVector *outputVector) override;
70
71 int SendVtkDataObject(vtkDataObject *object);
72 int ParseVtkDataObjectFromJSON(const std::string &json);
73};
Baseclass of all VTK filters that wrap ttk modules.
virtual int RequestData(vtkInformation *ttkNotUsed(request), vtkInformationVector **ttkNotUsed(inputVectors), vtkInformationVector *ttkNotUsed(outputVector))
int FillInputPortInformation(int ttkNotUsed(port), vtkInformation *ttkNotUsed(info)) override
int FillOutputPortInformation(int ttkNotUsed(port), vtkInformation *ttkNotUsed(info)) override
static ttkWebSocketIO * New()
~ttkWebSocketIO() override
virtual int processEvent(const std::string &eventName, const std::string &eventData="")