VTKFIG  0.20.20181114
Easy VTK based in situ visualization
void vtkfig::XYPlot::ClientMTReceive ( vtkSmartPointer< internals::Communicator communicator)
finaloverrideprivatevirtual

Server-Client receive.

Reimplemented from vtkfig::Figure.

Definition at line 572 of file vtkfigXYPlot.cxx.

573  {
574  Clear();
575  communicator->ReceiveString(title);
576  communicator->ReceiveString(xtitle);
577  communicator->ReceiveString(ytitle);
578  communicator->ReceiveCharBuffer((char*)&PlotState,sizeof(PlotState));
579 
580  int np;
581  int npi;
582  communicator->ReceiveInt(np);
583  communicator->ReceiveInt(npi);
584  std::vector<PlotInfo> NewPlotInfo(npi);
585  char *data=(char*)NewPlotInfo.data();
586  int ndata=npi*sizeof(PlotInfo);
587  communicator->ReceiveCharBuffer(data,ndata);
588 
589 
590  for (int i=0;i<np;i++)
591  {
592  while (num_plots>=AllPlotData.size())
593  {
594  AllPlotData.emplace_back(XYPlotActor,num_curves);
595  }
596 
597  auto plot=AllPlotData[num_plots];
598  NextPlotInfo=NewPlotInfo[i];
599  communicator->Receive(plot.X,1,1);
600  communicator->Receive(plot.Y,1,1);
601  AddPlot();
602  }
603  };
void AddPlot()
Internal addplot after plot data have been filled.
std::string xtitle
Definition: vtkfigXYPlot.h:187
struct vtkfig::XYPlot::@4 PlotState
General state of the XYPlot.
vtkSmartPointer< vtkXYPlotActor > XYPlotActor
The main graphics actor.
Definition: vtkfigXYPlot.h:175
PlotInfo NextPlotInfo
"finite state machine" struture accumulating repective info for next plot
Definition: vtkfigXYPlot.h:278
int num_curves
Number of all curves including grid lines.
Definition: vtkfigXYPlot.h:172
size_t num_plots
Number of "real" plots.
Definition: vtkfigXYPlot.h:166
std::vector< PlotData > AllPlotData
vector holding data of all plots
Definition: vtkfigXYPlot.h:227
std::string title
Definition: vtkfigXYPlot.h:185
std::string ytitle
Definition: vtkfigXYPlot.h:186
void Clear()
Remove all data from plot.

+ Here is the call graph for this function: