DRDE/ACTK1_0/se/LPE/LPCmdExtender.hpp

31 lines
671 B
C++
Raw Normal View History

2014-01-23 03:03:18 +00:00
#ifndef _LPE_COMMAND_EXTENSION_HPP_
#define _LPE_COMMAND_EXTENSION_HPP_
2014-01-23 04:05:35 +00:00
#include "se/Command.hpp"
2014-01-23 03:03:18 +00:00
#include "se/CommandExtension.hpp"
#include "LPLaunch.hpp"
2014-01-23 04:05:35 +00:00
2014-01-23 03:03:18 +00:00
class LPCmdExtender : public CommandExtension
{
public:
virtual void addToCommand(const Command &command) const;
void setCreateData(LPLaunch* createData);
void createXMLElement(XMLWriter* xmlWriter, DOMElement* addElement);
2014-01-23 04:05:35 +00:00
2014-01-23 13:03:48 +00:00
LPCmdExtender(Command x) : t(x.getCommandType()) {}
2014-01-23 03:03:18 +00:00
private:
2014-01-23 04:05:35 +00:00
2014-01-23 13:03:48 +00:00
const CommandType *t;
2014-01-23 03:03:18 +00:00
std::auto_ptr<LPLaunch> createData;
};
inline void LPCmdExtender::setCreateData(LPLaunch* createData)
{
this->createData.reset(createData);
}
#endif /* _LPE_COMMAND_EXTENSION_HPP_ */