void BaseDim::writeXMLToStream(OutStream& out_stream) const { // open tag out_stream << "<"; // get sub-class to output the data for this single dimension writeXMLElementName_impl(out_stream); out_stream << " "; writeXMLElementAttributes_impl(out_stream); if (d_operand) { // terminate the opening element tag out_stream << ">" << std::endl; // write out the DimOperator out_stream << "<DimOperator op=\"" << FalagardXMLHelper::dimensionOperatorToString(d_operator) << "\">" << std::endl; // write out the other operand d_operand->writeXMLToStream(out_stream); // write closing tag for DimOperator element out_stream << "</DimOperator>" << std::endl; // write closing tag for this dimension element out_stream << "</"; writeXMLElementName_impl(out_stream); out_stream << ">" << std::endl; } // no operand, so just close this tag. else { out_stream << " />" << std::endl; } }
//----------------------------------------------------------------------------// void BaseDim::writeXMLToStream(XMLSerializer& xml_stream) const { // get sub-class to output the data for this single dimension writeXMLElementName_impl(xml_stream); writeXMLElementAttributes_impl(xml_stream); xml_stream.closeTag(); }
//----------------------------------------------------------------------------// void OperatorDim::writeXMLToStream(XMLSerializer& xml_stream) const { writeXMLElementName_impl(xml_stream); writeXMLElementAttributes_impl(xml_stream); if (d_left) d_left->writeXMLToStream(xml_stream); if (d_right) d_right->writeXMLToStream(xml_stream); xml_stream.closeTag(); }