DRDE/ACTK1_0/se/LPE/LPCmdExtender.cpp

26 lines
675 B
C++
Raw Normal View History

2014-01-23 03:03:18 +00:00
#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);
}
}