From 1ae76433c9e61e3e755b7ab925e2d5c087170cc7 Mon Sep 17 00:00:00 2001 From: Martin Hierholzer <martin.hierholzer@desy.de> Date: Wed, 7 Dec 2016 13:29:22 +0100 Subject: [PATCH] added number of elements to the XML file --- src/VariableNetworkNode.cc | 4 ++++ xmlschema/application.xsd | 1 + 2 files changed, 5 insertions(+) diff --git a/src/VariableNetworkNode.cc b/src/VariableNetworkNode.cc index 79d3d25c..f2978f25 100644 --- a/src/VariableNetworkNode.cc +++ b/src/VariableNetworkNode.cc @@ -188,6 +188,10 @@ namespace ChimeraTK { // add sub-element containing the description xmlpp::Element *descriptionElement = variable->add_child("description"); descriptionElement->set_child_text(pdata->network->getDescription()); + + // add sub-element containing the description + xmlpp::Element *nElementsElement = variable->add_child("numberOfElements"); + nElementsElement->set_child_text(std::to_string(pdata->network->getFeedingNode().getNumberOfElements())); } /*********************************************************************************************************************/ diff --git a/xmlschema/application.xsd b/xmlschema/application.xsd index fd7913c7..c94ebc26 100644 --- a/xmlschema/application.xsd +++ b/xmlschema/application.xsd @@ -35,6 +35,7 @@ <xsd:element name="direction" type="DirectionType" minOccurs="1" maxOccurs="1"/> <xsd:element name="unit" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="description" type="xsd:string" minOccurs="1" maxOccurs="1"/> + <xsd:element name="numberOfElements" type="xsd:integer" minOccurs="1" maxOccurs="1"/> </xsd:sequence> <xsd:attribute name="name" type="xsd:string" use="required"/> </xsd:complexType> -- GitLab