MCPcopy Create free account
hub / github.com/clechasseur/pathcopycopy / ReadElementCount

Method ReadElementCount

PathCopyCopy/src/PluginPipelineDecoder.cpp:489–500  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.

Callers 1

DecodePipelineMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected