DRDE/ACTK1_0/se/LPE/LPChkCmdExtension.cpp

22 lines
762 B
C++
Raw Normal View History

2014-01-24 20:49:09 +00:00
#include "se/LPE/LPChkCmdExtension.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 LPChkCmdExtension::addToCommand(const Command &command) const
{
XMLWriter* xmlWriter = command.getXmlWriter();
DOMElement* extensionElement = command.getExtensionElement();
DOMElement* launchElement = xmlWriter->appendChild(extensionElement,
"launch:claims", lpExtension().getURI());
DOMElement* exPhaseElement = xmlWriter->appendChild(launchElement, "launch:phase");
XMLHelper::setTextContent(exPhaseElement, lpePhaseName);
}