diff options
Diffstat (limited to '')
-rw-r--r-- | mutator_report.cpp | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/mutator_report.cpp b/mutator_report.cpp index 0eef3ca..c989d32 100644 --- a/mutator_report.cpp +++ b/mutator_report.cpp @@ -38,13 +38,41 @@ using json = nlohmann::json; namespace Devi { /*********************************************************************************************************************/ /*********************************************************************************************************************/ +/****************************************************XMLReportBase****************************************************/ + XMLReportBase::XMLReportBase() + { + RootPointer = Doc.NewElement("mutagen:Report"); + RootPointer->SetAttribute("xmlns:mutator", "http://www.w3.org/2001/XMLSchema"); + } + + XMLReportBase::~XMLReportBase() + { + Doc.InsertEndChild(RootPointer); + } + + void XMLReportBase::CreateReport() + { + Doc.InsertFirstChild(RootPointer); + } + + void XMLReportBase::SaveReport() + { + Doc.InsertEndChild(RootPointer); + + XMLError XMLErrorResult = Doc.SaveFile("./test/misrareport.xml"); + + if (XMLErrorResult != XML_SUCCESS) + { + std::cerr << "could not write xml misra report.\n"; + } + } +/************************************************end of XMLReportBase*************************************************/ +/*********************************************************************************************************************/ /******************************************************XMLReport******************************************************/ XMLReport::XMLReport() { RootPointer = XMLReportDoc.NewElement("mutator:Report"); -#if 1 RootPointer->SetAttribute("xmlns:mutator", "http://www.w3.org/2001/XMLSchema"); -#endif } XMLReport::~XMLReport() |