DRDE/ACTK1_0/se/LPE/LPCrtCmdExtension.hpp

49 lines
1.3 KiB
C++

#ifndef __DOMAIN_CR_COMMAND_EXTENSION_HPP
#define __DOMAIN_CR_COMMAND_EXTENSION_HPP
#include <string>
#include "common/ErrorPkg.hpp"
#include "se/Command.hpp"
#include "se/CommandExtension.hpp"
#include "se/IllegalArgException.hpp"
using namespace std;
class LPCrtCmdExtension : public CommandExtension
{
public:
LPCrtCmdExtension (const std::string *phaseName);
virtual void addToCommand(const Command &command) const;
bool hasNoticeID() {return haveNoticeID;}
void setNoticeID(string &idVal,string &notAftVal, string &acceptedVal) {
noticeID = idVal; notAfter = notAftVal; acceptedDate = acceptedVal; haveNoticeID = true;
}
void setSMD(std::string toWhat);
private:
bool haveNoticeID,haveSMD;
std::string acceptedDate;
std::string lpePhaseName;
std::string noticeID;
std::string notAfter;
std::string smdData;
};
inline LPCrtCmdExtension::LPCrtCmdExtension( const std::string *phaseName)
{
if (phaseName == NULL)
{
throw IllegalArgException(
ErrorPkg::getMessage("launch extension phase not set"));
}
lpePhaseName = std::string(*phaseName);
haveNoticeID = haveSMD = false;
}
#endif // __DOMAIN_UPDATE_COMMAND_EXTENSION_HPP