----------------------------------------------------------------------------
| 1684 | |
| 1685 | //---------------------------------------------------------------------------- |
| 1686 | unsigned 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 | //---------------------------------------------------------------------------- |
| 1708 | unsigned char* vtkClientServerStream::ParseValue( |
no test coverage detected