#include "se/LPE/LPCrtCmdExtension.hpp" #include "se/Command.hpp" #include "se/LPE/LPExtension.hpp" #include "xml/XMLHelper.hpp" namespace { LPExtension& lpExtension() { static LPExtension* lpExtension = new LPExtension(); return *lpExtension; } }; // anonymous namespace void LPCrtCmdExtension::addToCommand(const Command &command) const { XMLWriter* xmlWriter = command.getXmlWriter(); DOMElement* extensionElement = command.getExtensionElement(); DOMElement* launchElement = xmlWriter->appendChild(extensionElement, "create", lpExtension().getURI()); DOMElement* exPhaseElement = xmlWriter->appendChild(launchElement, "launch:phase"); XMLHelper::setTextContent(exPhaseElement, lpePhaseName); }