Gromacs
2020.4
|
#include "gmxpre.h"
#include "refdata_xml.h"
#include <tinyxml2.h>
#include "gromacs/utility/exceptions.h"
#include "testutils/refdata_impl.h"
#include "testutils/testexceptions.h"
Implements reference data XML persistence.
Typedefs | |
typedef tinyxml2::XMLDocument * | gmx::test::anonymous_namespace{refdata_xml.cpp}::XMLDocumentPtr |
Convenience typedef. | |
typedef tinyxml2::XMLNode * | gmx::test::anonymous_namespace{refdata_xml.cpp}::XMLNodePtr |
Convenience typedef. | |
typedef tinyxml2::XMLElement * | gmx::test::anonymous_namespace{refdata_xml.cpp}::XMLElementPtr |
Convenience typedef. | |
typedef tinyxml2::XMLText * | gmx::test::anonymous_namespace{refdata_xml.cpp}::XMLTextPtr |
Convenience typedef. | |
Functions | |
ReferenceDataEntry::EntryPointer | gmx::test::readReferenceDataFile (const std::string &path) |
Loads reference data from an XML file. More... | |
void | gmx::test::writeReferenceDataFile (const std::string &path, const ReferenceDataEntry &root) |
Saves reference data to an XML file. More... | |
Helper functions for XML reading | |
void | gmx::test::anonymous_namespace{refdata_xml.cpp}::readEntry (XMLNodePtr element, ReferenceDataEntry *entry) |
Read element and transfer the contents to entry . | |
XMLNodePtr | gmx::test::anonymous_namespace{refdata_xml.cpp}::getCDataChildNode (XMLNodePtr node) |
bool | gmx::test::anonymous_namespace{refdata_xml.cpp}::hasCDataContent (XMLNodePtr node) |
XMLNodePtr | gmx::test::anonymous_namespace{refdata_xml.cpp}::getNextTextChildNode (XMLNodePtr childNode) |
Return a node convertible to text, either childNode or its first such sibling. | |
std::string | gmx::test::anonymous_namespace{refdata_xml.cpp}::getValueFromLeafElement (XMLNodePtr node) |
Return the concatenation of all the text children of node , including multiple CDATA children. | |
ReferenceDataEntry::EntryPointer | gmx::test::anonymous_namespace{refdata_xml.cpp}::createEntry (XMLElementPtr element) |
Make a new entry from element . | |
void | gmx::test::anonymous_namespace{refdata_xml.cpp}::readChildEntries (XMLNodePtr parentElement, ReferenceDataEntry *entry) |
Read the child entries of parentElement and transfer the contents to entry . | |
bool | gmx::test::anonymous_namespace{refdata_xml.cpp}::isCompoundElement (XMLNodePtr node) |
Return whether node has child XML elements (rather than text content). | |
Helper functions for XML writing | |
void | gmx::test::anonymous_namespace{refdata_xml.cpp}::createElementAndContents (XMLElementPtr parentElement, const ReferenceDataEntry &entry) |
void | gmx::test::anonymous_namespace{refdata_xml.cpp}::setIdAttribute (XMLElementPtr element, const std::string &id) |
XMLElementPtr | gmx::test::anonymous_namespace{refdata_xml.cpp}::createElement (XMLElementPtr parentElement, const ReferenceDataEntry &entry) |
void | gmx::test::anonymous_namespace{refdata_xml.cpp}::createChildElements (XMLElementPtr parentElement, const ReferenceDataEntry &entry) |
std::vector< std::string > | gmx::test::anonymous_namespace{refdata_xml.cpp}::breakUpAnyCdataEndTags (const std::string &input) |
Handle input intended to be written as CDATA. More... | |
void | gmx::test::anonymous_namespace{refdata_xml.cpp}::createElementContents (XMLElementPtr element, const ReferenceDataEntry &entry) |
XMLElementPtr | gmx::test::anonymous_namespace{refdata_xml.cpp}::createRootElement (XMLDocumentPtr document) |
Variables | |
const char *const | gmx::test::anonymous_namespace{refdata_xml.cpp}::c_VersionDeclarationString = "xml version=\"1.0\"" |
XML version declaration used when writing the reference data. | |
const char *const | gmx::test::anonymous_namespace{refdata_xml.cpp}::c_StyleSheetDeclarationString |
XML stylesheet declaration used for writing the reference data. More... | |
const char *const | gmx::test::anonymous_namespace{refdata_xml.cpp}::c_RootNodeName = "ReferenceData" |
Name of the root element in reference data XML files. | |
const char *const | gmx::test::anonymous_namespace{refdata_xml.cpp}::c_IdAttrName = "Name" |
Name of the XML attribute used to store identifying strings for reference data elements. | |