31 lines
782 B
C++
31 lines
782 B
C++
#include "se/Command.hpp"
|
|
#include "se/CommandType.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;
|
|
|
|
thisCommand = command.getCommandType()->getCommandName();
|
|
|
|
createElement = xmlWriter->appendChild(extensionElement,
|
|
"create", launchPhaseExtension().getURI());
|
|
|
|
if (createData.get() != NULL)
|
|
{
|
|
createData->createXMLElement(xmlWriter, createElement);
|
|
}
|
|
}
|