Reads the number of elements in the pipeline. This must be called first before any other data is read to get the number of encoded elements that follow. @return Number of encoded elements in the pipeline.
| 487 | // @return Number of encoded elements in the pipeline. |
| 488 | // |
| 489 | auto PipelineDecoder::EncodedElementsStream::ReadElementCount() -> size_t |
| 490 | { |
| 491 | assert(m_CurIndex == 0); |
| 492 | |
| 493 | // The first two characters are a string representation of the number |
| 494 | // of elements in the pipeline (99 being the maximum number of elements |
| 495 | // there can be). |
| 496 | std::wstringstream wss(ReadData(2)); |
| 497 | size_t numElements = 0; |
| 498 | wss >> numElements; |
| 499 | return numElements; |
| 500 | } |
| 501 | |
| 502 | // |
| 503 | // Reads an encoded integer from the elements stream. |