#include "se/Command.hpp" #include "LPExtension.hpp" #include "xml/XMLHelper.hpp" #include "LPCmdExtender.hpp" namespace { LPExtension& launchPhaseExtension() { static LPExtension* lpExtension = new LPExtension(); return *lpExtension; } }; // anonymous namespace void LPCmdExtender::addToCommand(const Command &command) const { XMLWriter* xmlWriter = command.getXmlWriter(); DOMElement* extensionElement = command.getExtensionElement(); DOMElement* createElement = xmlWriter->appendChild(extensionElement, "create", launchPhaseExtension().getURI()); if (createData.get() != NULL) { createData->createXMLElement(xmlWriter, createElement); } }