You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
861 B
27 lines
861 B
3 years ago
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
||
|
|
||
|
#include "cmCTestTestMeasurementXMLParser.h"
|
||
|
|
||
|
#include <cstring>
|
||
|
|
||
|
void cmCTestTestMeasurementXMLParser::StartElement(const std::string& name,
|
||
|
const char** attributes)
|
||
|
{
|
||
|
this->CharacterData.clear();
|
||
|
this->ElementName = name;
|
||
|
for (const char** attr = attributes; *attr; attr += 2) {
|
||
|
if (strcmp(attr[0], "name") == 0) {
|
||
|
this->MeasurementName = attr[1];
|
||
|
} else if (strcmp(attr[0], "type") == 0) {
|
||
|
this->MeasurementType = attr[1];
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void cmCTestTestMeasurementXMLParser::CharacterDataHandler(const char* data,
|
||
|
int length)
|
||
|
{
|
||
|
this->CharacterData.append(data, length);
|
||
|
}
|