| 516 | } |
| 517 | |
| 518 | static void writeContainerFunctions(QXmlStreamWriter &xmlWriter, const QString &name, int extra, const QList<CppcheckLibraryData::Container::Function> &functions) |
| 519 | { |
| 520 | if (functions.isEmpty() && extra < 0) |
| 521 | return; |
| 522 | xmlWriter.writeStartElement(name); |
| 523 | if (extra >= 0) { |
| 524 | if (name == "access") |
| 525 | xmlWriter.writeAttribute("indexOperator", "array-like"); |
| 526 | else if (name == "size") |
| 527 | xmlWriter.writeAttribute("templateParameter", QString::number(extra)); |
| 528 | } |
| 529 | for (const CppcheckLibraryData::Container::Function &function : functions) { |
| 530 | xmlWriter.writeStartElement("function"); |
| 531 | xmlWriter.writeAttribute("name", function.name); |
| 532 | if (!function.action.isEmpty()) |
| 533 | xmlWriter.writeAttribute("action", function.action); |
| 534 | if (!function.yields.isEmpty()) |
| 535 | xmlWriter.writeAttribute("yields", function.yields); |
| 536 | xmlWriter.writeEndElement(); |
| 537 | } |
| 538 | xmlWriter.writeEndElement(); |
| 539 | } |
| 540 | |
| 541 | static void writeContainerRangeItemRecords(QXmlStreamWriter &xmlWriter, const QList<CppcheckLibraryData::Container::RangeItemRecordType> &rangeItemRecords) |
| 542 | { |
no test coverage detected