MCPcopy Create free account
hub / github.com/Kitware/ParaView / SetData

Method SetData

Remoting/ClientServerStream/vtkClientServerStream.cxx:1520–1550  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1518
1519//----------------------------------------------------------------------------
1520int vtkClientServerStream::SetData(const unsigned char* data, size_t length)
1521{
1522 // Reset and remove the byte order entry from the stream.
1523 this->Reset();
1524 this->Internal->Data.erase(this->Internal->Data.begin(), this->Internal->Data.end());
1525
1526 // Store the given data in the stream.
1527 if (data)
1528 {
1529 this->Internal->Data.insert(this->Internal->Data.begin(), data, data + length);
1530 }
1531
1532 // Parse the stream to fill in ValueOffsets and MessageIndexes and
1533 // to perform byte-swapping if necessary.
1534 if (this->ParseData())
1535 {
1536// Data have been byte-swapped to the native representation.
1537#ifdef VTK_WORDS_BIGENDIAN
1538 this->Internal->Data[0] = vtkClientServerStream::BigEndian;
1539#else
1540 this->Internal->Data[0] = vtkClientServerStream::LittleEndian;
1541#endif
1542 return 1;
1543 }
1544 else
1545 {
1546 // Data are invalid. Reset the stream and report failure.
1547 this->Reset();
1548 return 0;
1549 }
1550}
1551
1552//----------------------------------------------------------------------------
1553int vtkClientServerStream::ParseData()

Callers 15

coprocessorcreateimageFunction · 0.45
BuildVTKGridFunction · 0.45
BuildVTKGridFunction · 0.45
BuildVTKGridFunction · 0.45
BuildVTKGridFunction · 0.45
BuildVTKGridFunction · 0.45
BuildVTKGridFunction · 0.45
BuildVTKGridFunction · 0.45
BuildVTKGridFunction · 0.45

Calls 6

ResetMethod · 0.95
ParseDataMethod · 0.95
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by 1

GetResultMessageMethod · 0.36