DRDE/ACTK1_0/se/LPE/LPCheck.cpp

32 lines
834 B
C++
Raw Normal View History

2014-01-23 21:06:09 +00:00
#include "LPCheck.hpp"
#include "xml/XMLHelper.hpp"
namespace {
Extension& launchPhaseExtension() {
2014-01-24 16:38:51 +00:00
static Extension* lpExtension = new LPExtension();
2014-01-23 21:06:09 +00:00
return *lpExtension;
}
}; // anonymous namespace
void LPCheck::setExtension ()
{
DOMElement *lpeCreate =
xmlWriter->appendChild( xmlWriter->appendChild( command, "extension"),
2014-01-24 16:38:51 +00:00
"launch:check", launchPhaseExtension().getURI());
2014-01-23 21:06:09 +00:00
2014-01-24 16:38:51 +00:00
}
void LPCheck::addToCommand(const Command &command) const
{
XMLWriter* xmlWriter = command.getXmlWriter();
DOMElement* extensionElement = command.getExtensionElement();
DOMElement* createElement = xmlWriter->appendChild(extensionElement,
"lauch:claims", launchPhaseExtension().getURI());
2014-01-23 21:06:09 +00:00
2014-01-24 16:38:51 +00:00
if (createData.get() != NULL)
{
createData->createXMLElement(xmlWriter, createElement);
}
2014-01-23 21:06:09 +00:00
}