MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / writeContainer

Function writeContainer

gui/cppchecklibrarydata.cpp:555–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553}
554
555static void writeContainer(QXmlStreamWriter &xmlWriter, const CppcheckLibraryData::Container &container)
556{
557 xmlWriter.writeStartElement("container");
558 xmlWriter.writeAttribute("id", container.id);
559 if (!container.startPattern.isEmpty())
560 xmlWriter.writeAttribute("startPattern", container.startPattern);
561 if (!container.endPattern.isNull())
562 xmlWriter.writeAttribute("endPattern", container.endPattern);
563 if (!container.inherits.isEmpty())
564 xmlWriter.writeAttribute("inherits", container.inherits);
565 if (!container.opLessAllowed.isEmpty())
566 xmlWriter.writeAttribute("opLessAllowed", container.opLessAllowed);
567 if (!container.itEndPattern.isEmpty())
568 xmlWriter.writeAttribute("itEndPattern", container.itEndPattern);
569
570 if (!container.type.templateParameter.isEmpty() || !container.type.string.isEmpty()) {
571 xmlWriter.writeStartElement("type");
572 if (!container.type.templateParameter.isEmpty())
573 xmlWriter.writeAttribute("templateParameter", container.type.templateParameter);
574 if (!container.type.string.isEmpty())
575 xmlWriter.writeAttribute("string", container.type.string);
576 xmlWriter.writeEndElement();
577 }
578 writeContainerFunctions(xmlWriter, "size", container.size_templateParameter, container.sizeFunctions);
579 writeContainerFunctions(xmlWriter, "access", container.access_arrayLike?1:-1, container.accessFunctions);
580 writeContainerFunctions(xmlWriter, "other", -1, container.otherFunctions);
581 writeContainerRangeItemRecords(xmlWriter, container.rangeItemRecordTypeList);
582 xmlWriter.writeEndElement();
583}
584
585static void writeFunction(QXmlStreamWriter &xmlWriter, const CppcheckLibraryData::Function &function)
586{

Callers 1

toStringMethod · 0.85

Calls 3

writeContainerFunctionsFunction · 0.85
isEmptyMethod · 0.80

Tested by

no test coverage detected