MCPcopy Create free account
hub / github.com/IENT/YUView / readBytes

Method readBytes

YUViewLib/src/parser/common/SubByteReaderLogging.cpp:282–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282ByteVector SubByteReaderLogging::readBytes(const std::string &symbolName,
283 size_t nrBytes,
284 const Options & options)
285{
286 try
287 {
288 if (!this->byte_aligned())
289 throw std::logic_error("Trying to read bytes while not byte aligned.");
290
291 auto [value, code] = SubByteReader::readBytes(nrBytes);
292 checkAndLog(this->currentTreeLevel, symbolName, options, value, code);
293 return value;
294 }
295 catch (const std::exception &ex)
296 {
297 this->logExceptionAndThrowError(ex, " " + std::to_string(nrBytes) + " bytes.");
298 }
299}
300
301void SubByteReaderLogging::logCalculatedValue(const std::string &symbolName,
302 int64_t value,

Callers

nothing calls this directly

Calls 4

checkAndLogFunction · 0.85
byte_alignedMethod · 0.80
to_stringFunction · 0.50

Tested by

no test coverage detected