31 if (
"CoordTransform" != coordTransElement->localName()) {
32 std::string message =
"This is not a coordinate transform element: " + coordTransElement->localName();
33 throw std::invalid_argument(message);
35 if (
"CoordTransformDistance" != coordTransElement->getChildElement(
"Type")->innerText()) {
38 throw std::runtime_error(
"CoordTransformDistanceParser has no successor parser.");
40 return m_successor->createTransform(coordTransElement);
43 Element *paramListElement = coordTransElement->getChildElement(
"ParameterList");
44 Poco::AutoPtr<Poco::XML::NodeList> parameters = paramListElement->getElementsByTagName(
"Parameter");
47 InDimParameterParser inDimParamParser;
48 auto *parameter =
dynamic_cast<Poco::XML::Element *
>(parameters->item(0));
49 std::shared_ptr<Mantid::API::InDimParameter> inDimParameter(inDimParamParser.createWithoutDelegation(parameter));
52 OutDimParameterParser outDimParamParser;
53 parameter =
dynamic_cast<Poco::XML::Element *
>(parameters->item(1));
54 std::shared_ptr<Mantid::API::OutDimParameter> outDimParameter(outDimParamParser.createWithoutDelegation(parameter));
58 CoordCenterParser coordCenterParser;
59 parameter =
dynamic_cast<Poco::XML::Element *
>(parameters->item(2));
60 std::shared_ptr<Mantid::DataObjects::CoordCenterVectorParam> coordCenterParam(
61 coordCenterParser.createWithoutDelegation(parameter));
64 DimsUsedParser dimsUsedParser;
65 parameter =
dynamic_cast<Poco::XML::Element *
>(parameters->item(3));
66 std::shared_ptr<Mantid::DataObjects::DimensionsUsedVectorParam> dimsUsedVecParm(
67 dimsUsedParser.createWithoutDelegation(parameter));
70 auto transform =
new CoordTransformDistance(inDimParameter->getValue(), coordCenterParam->getPointerToStart(),
71 dimsUsedVecParm->getPointerToStart());
#define UNUSED_ARG(x)
Function arguments are sometimes unused in certain implmentations but are required for documentation ...
XML Parser for single value parameter types.
XML parser for vector value (n elements) parameter types.