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

Method ParseType

Remoting/ClientServerStream/vtkClientServerStream.cxx:1686–1705  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1684
1685//----------------------------------------------------------------------------
1686unsigned char* vtkClientServerStream::ParseType(int order, unsigned char* data,
1687 unsigned char* begin, unsigned char* end, vtkClientServerStream::Types* type)
1688{
1689 // Read this type identifier.
1690 vtkTypeUInt32 tp;
1691 if (data > end - sizeof(tp))
1692 {
1693 /* ERROR */
1694 return nullptr;
1695 }
1696 this->PerformByteSwap(order, data, 1, sizeof(tp));
1697 memcpy(&tp, data, sizeof(tp));
1698 *type = static_cast<vtkClientServerStream::Types>(tp);
1699
1700 // Record the start of this type and optional value.
1701 this->Internal->ValueOffsets.push_back(data - begin);
1702
1703 // Return the position after the type identifier.
1704 return data + sizeof(vtkTypeUInt32);
1705}
1706
1707//----------------------------------------------------------------------------
1708unsigned char* vtkClientServerStream::ParseValue(

Callers 1

ParseDataMethod · 0.95

Calls 2

PerformByteSwapMethod · 0.95
push_backMethod · 0.80

Tested by

no test coverage detected