DRDE/ACTK1_0/se/LPE/LPChkRespExtension.cpp

43 lines
929 B
C++
Raw Normal View History

2014-01-25 17:30:04 +00:00
#include "xml/XMLDocument.hpp"
#include "se/Response.hpp"
#include "se/ResponseExtension.hpp"
#include "se/LPE/LPChkRespExtension.hpp"
2014-01-27 03:33:17 +00:00
#include <xalanc/XalanDOM/XalanNamedNodeMap.hpp>
#include <xalanc/XalanDOM/XalanDOMString.hpp>
extern mdLogger mdLog;
2014-01-25 17:30:04 +00:00
/*
* Have to use static funcion instead of static variable
* since there is not guarantee about the construct/destruct
* order of a static instance of any types
*/
2014-01-27 03:33:17 +00:00
const std::string LPChkRespExtension::CKCLAIM_EXPR()
2014-01-25 17:30:04 +00:00
{
2014-01-27 03:33:17 +00:00
return EXTENSION_EXPR() + "/launch:cd/launch:name";
2014-01-25 17:30:04 +00:00
}
2014-01-27 03:33:17 +00:00
LPChkRespExtension::LPChkRespExtension() : typeIsClaims(true)
2014-01-25 17:30:04 +00:00
{
}
void LPChkRespExtension::fromXML(XMLDocument *xmlDoc)
{
2014-01-27 03:33:17 +00:00
const std::string respElement = CKCLAIM_EXPR();
2014-01-25 17:30:04 +00:00
2014-01-27 03:33:17 +00:00
try {
const XalanNode * response = xmlDoc->getElement(respElement);
if (response) {
2014-01-25 17:30:04 +00:00
2014-01-27 03:33:17 +00:00
}
}
catch(std::exception e)
{
mdLog.logN(1,"%s.",e.what());
}
2014-01-25 17:30:04 +00:00
}