MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / parseMultiFrame

Method parseMultiFrame

app/src/DataModel/Scripting/FrameParser.cpp:466–483  ·  view source on GitHub ↗

* @brief Runs the source's engine over a text frame, falling back to source 0. */

Source from the content-addressed store, hash-verified

464 * @brief Runs the source's engine over a text frame, falling back to source 0.
465 */
466QList<QStringList> DataModel::FrameParser::parseMultiFrame(const QString& frame, int sourceId)
467{
468 Q_ASSERT(sourceId >= 0);
469 Q_ASSERT(!frame.isEmpty());
470
471 if (sourceId < 0 || frame.isEmpty()) [[unlikely]]
472 return {};
473
474 auto it = m_engines.find(sourceId);
475 if (it == m_engines.end() || !it->second->isLoaded()) {
476 if (sourceId == 0 || languageForSource(sourceId) != languageForSource(0))
477 return {};
478
479 return parseMultiFrame(frame, 0);
480 }
481
482 return it->second->parseString(frame);
483}
484
485/**
486 * @brief Runs the source's engine over a binary frame, falling back to source 0.

Callers 1

decodeAndParseFrameMethod · 0.80

Calls 5

isEmptyMethod · 0.80
findMethod · 0.80
isLoadedMethod · 0.45
parseStringMethod · 0.45
parseBinaryMethod · 0.45

Tested by

no test coverage detected