DRDE/ACTK1_0/se/LPE/LPCrtCmdExtension.cpp

22 lines
755 B
C++
Raw Normal View History

2014-01-24 22:23:30 +00:00
#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);
}