void ImageryComponent::writeXMLToStream(OutStream& out_stream) const { // opening tag out_stream << "<ImageryComponent>" << std::endl; // write out area d_area.writeXMLToStream(out_stream); // write image if (isImageFetchedFromProperty()) out_stream << "<ImageProperty name=\"" << d_imagePropertyName << "\" />" << std::endl; else out_stream << "<Image imageset=\"" << d_image->getImagesetName() << "\" image=\"" << d_image->getName() << "\" />" << std::endl; // get base class to write colours writeColoursXML(out_stream); // write vert format, allowing base class to do this for us if a propety is in use if (!writeVertFormatXML(out_stream)) { // was not a property, so write out explicit formatting in use out_stream << "<VertFormat type=\"" << FalagardXMLHelper::vertFormatToString(d_vertFormatting) << "\" />" << std::endl; } // write horz format, allowing base class to do this for us if a propety is in use if (!writeHorzFormatXML(out_stream)) { // was not a property, so write out explicit formatting in use out_stream << "<HorzFormat type=\"" << FalagardXMLHelper::horzFormatToString(d_horzFormatting) << "\" />" << std::endl; } // closing tag out_stream << "</ImageryComponent>" << std::endl; }
void TextComponent::writeXMLToStream(OutStream& out_stream) const { // opening tag out_stream << "<TextComponent>" << std::endl; // write out area d_area.writeXMLToStream(out_stream); // write text element out_stream << "<Text font=\"" << d_font << "\" string=\"" << d_text << "\" />" << std::endl; // get base class to write colours writeColoursXML(out_stream); // write vert format, allowing base class to do this for us if a propety is in use if (!writeVertFormatXML(out_stream)) { // was not a property, so write out explicit formatting in use out_stream << "<VertFormat type=\"" << FalagardXMLHelper::vertTextFormatToString(d_vertFormatting) << "\" />" << std::endl; } // write horz format, allowing base class to do this for us if a propety is in use if (!writeHorzFormatXML(out_stream)) { // was not a property, so write out explicit formatting in use out_stream << "<HorzFormat type=\"" << FalagardXMLHelper::horzTextFormatToString(d_horzFormatting) << "\" />" << std::endl; } // closing tag out_stream << "</TextComponent>" << std::endl; }
void TextComponent::writeXMLToStream(XMLSerializer& xml_stream) const { // opening tag xml_stream.openTag("TextComponent"); // write out area d_area.writeXMLToStream(xml_stream); // write text element if (!d_font.empty() && !d_text.empty()) { xml_stream.openTag("Text"); if (!d_font.empty()) xml_stream.attribute("font", d_font); if (!d_text.empty()) xml_stream.attribute("string", d_text); xml_stream.closeTag(); } // write text property element if (!d_textPropertyName.empty()) { xml_stream.openTag("TextProperty") .attribute("name", d_textPropertyName) .closeTag(); } // write font property element if (!d_fontPropertyName.empty()) { xml_stream.openTag("FontProperty") .attribute("name", d_fontPropertyName) .closeTag(); } // get base class to write colours writeColoursXML(xml_stream); // write vert format, allowing base class to do this for us if a propety is in use if (!writeVertFormatXML(xml_stream)) { // was not a property, so write out explicit formatting in use xml_stream.openTag("VertFormat") .attribute("type", FalagardXMLHelper::vertTextFormatToString(d_vertFormatting)) .closeTag(); } // write horz format, allowing base class to do this for us if a propety is in use if (!writeHorzFormatXML(xml_stream)) { // was not a property, so write out explicit formatting in use xml_stream.openTag("HorzFormat") .attribute("type", FalagardXMLHelper::horzTextFormatToString(d_horzFormatting)) .closeTag(); } // closing tag xml_stream.closeTag(); }
void FrameComponent::writeXMLToStream(XMLSerializer& xml_stream) const { // opening tag xml_stream.openTag("FrameComponent"); // write out area d_area.writeXMLToStream(xml_stream); // write images for (int i = 0; i < FIC_FRAME_IMAGE_COUNT; ++i) { if (d_frameImages[i]) { xml_stream.openTag("Image") .attribute("imageset", d_frameImages[i]->getImagesetName()) .attribute("image", d_frameImages[i]->getName()) .attribute("type", FalagardXMLHelper::frameImageComponentToString(static_cast<FrameImageComponent>(i))) .closeTag(); } } // get base class to write colours writeColoursXML(xml_stream); // write vert format, allowing base class to do this for us if a propety is in use if (!writeVertFormatXML(xml_stream)) { // was not a property, so write out explicit formatting in use xml_stream.openTag("VertFormat") .attribute("type", FalagardXMLHelper::vertFormatToString(d_vertFormatting)) .closeTag(); } // write horz format, allowing base class to do this for us if a propety is in use if (!writeHorzFormatXML(xml_stream)) { // was not a property, so write out explicit formatting in use xml_stream.openTag("HorzFormat") .attribute("type", FalagardXMLHelper::horzFormatToString(d_horzFormatting)) .closeTag(); } // closing tag xml_stream.closeTag(); }
void ImageryComponent::writeXMLToStream(XMLSerializer& xml_stream) const { // opening tag xml_stream.openTag("ImageryComponent"); // write out area d_area.writeXMLToStream(xml_stream); // write image if (isImageFetchedFromProperty()) xml_stream.openTag("ImageProperty") .attribute("name", d_imagePropertyName) .closeTag(); else xml_stream.openTag("Image") .attribute("imageset", d_image->getImagesetName()) .attribute("image", d_image->getName()) .closeTag(); // get base class to write colours writeColoursXML(xml_stream); // write vert format, allowing base class to do this for us if a propety is in use if (!writeVertFormatXML(xml_stream)) { // was not a property, so write out explicit formatting in use xml_stream.openTag("VertFormat") .attribute("type", FalagardXMLHelper::vertFormatToString(d_vertFormatting)) .closeTag(); } // write horz format, allowing base class to do this for us if a propety is in use if (!writeHorzFormatXML(xml_stream)) { // was not a property, so write out explicit formatting in use xml_stream.openTag("HorzFormat") .attribute("type", FalagardXMLHelper::horzFormatToString(d_horzFormatting)) .closeTag(); } // closing tag xml_stream.closeTag(); }
void FrameComponent::writeXMLToStream(OutStream& out_stream) const { // opening tag out_stream << "<FrameComponent>" << std::endl; // write out area d_area.writeXMLToStream(out_stream); // write images for (int i = 0; i < FIC_FRAME_IMAGE_COUNT; ++i) { if (d_frameImages[i]) { out_stream << "<Image imageset=\"" << d_frameImages[i]->getImagesetName(); out_stream << "\" image=\"" << d_frameImages[i]->getName(); out_stream << "\" type=\"" << FalagardXMLHelper::frameImageComponentToString(static_cast<FrameImageComponent>(i)); out_stream << "\" />" << std::endl; } } // get base class to write colours writeColoursXML(out_stream); // write vert format, allowing base class to do this for us if a propety is in use if (!writeVertFormatXML(out_stream)) { // was not a property, so write out explicit formatting in use out_stream << "<VertFormat type=\"" << FalagardXMLHelper::vertFormatToString(d_vertFormatting) << "\" />" << std::endl; } // write horz format, allowing base class to do this for us if a propety is in use if (!writeHorzFormatXML(out_stream)) { // was not a property, so write out explicit formatting in use out_stream << "<HorzFormat type=\"" << FalagardXMLHelper::horzFormatToString(d_horzFormatting) << "\" />" << std::endl; } // closing tag out_stream << "</FrameComponent>" << std::endl; }