* @brief Configures the frame end delimiters and precomputes their KMP tables. */
| 241 | * @brief Configures the frame end delimiters and precomputes their KMP tables. |
| 242 | */ |
| 243 | void IO::FrameReader::setFinishSequences(const QList<QByteArray>& finishes) |
| 244 | { |
| 245 | m_finishSequences.clear(); |
| 246 | m_finishSequenceLps.clear(); |
| 247 | |
| 248 | for (const auto& f : finishes) { |
| 249 | if (f.isEmpty()) |
| 250 | continue; |
| 251 | |
| 252 | m_finishSequences.append(f); |
| 253 | m_finishSequenceLps.append(m_circularBuffer.buildKMPTable(f)); |
| 254 | } |
| 255 | |
| 256 | Q_ASSERT(m_finishSequences.size() == m_finishSequenceLps.size()); |
| 257 | } |
| 258 | |
| 259 | /** |
| 260 | * @brief Sets the operation mode and resets checksum state outside ProjectFile. |
no test coverage detected